Remove A_OrbitNights additional input offset on current target Z, don't need it
This commit is contained in:
parent
c8dcb57e83
commit
0fe41e06ff
|
@ -8544,14 +8544,12 @@ void A_ToggleFlameJet(mobj_t* actor)
|
||||||
// var1 = Angle adjustment (aka orbit speed)
|
// var1 = Angle adjustment (aka orbit speed)
|
||||||
// var2:
|
// var2:
|
||||||
// Lower 16 bits: height offset
|
// Lower 16 bits: height offset
|
||||||
// Upper 8 bits: set if object is Nightopian Helper
|
// Upper 16 bits: set if object is Nightopian Helper
|
||||||
// Highest 8 bits: center height offset to target by this divisor
|
|
||||||
//
|
//
|
||||||
void A_OrbitNights(mobj_t* actor)
|
void A_OrbitNights(mobj_t* actor)
|
||||||
{
|
{
|
||||||
INT32 ofs = (var2 & 0xFFFF);
|
INT32 ofs = (var2 & 0xFFFF);
|
||||||
boolean ishelper = ((var2 >> 16) & 0xFF);
|
boolean ishelper = var2 >> 16;
|
||||||
INT32 ofsdiv = var2 >> 24;
|
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_OrbitNights", actor))
|
if (LUA_CallAction("A_OrbitNights", actor))
|
||||||
return;
|
return;
|
||||||
|
@ -8581,10 +8579,7 @@ void A_OrbitNights(mobj_t* actor)
|
||||||
|
|
||||||
actor->x = actor->target->x + fc;
|
actor->x = actor->target->x + fc;
|
||||||
actor->y = actor->target->y + fs;
|
actor->y = actor->target->y + fs;
|
||||||
if (ofsdiv)
|
actor->z = actor->target->z + fh + FixedMul(16*FRACUNIT, actor->scale);
|
||||||
actor->z = (actor->target->z + actor->target->height / ofsdiv) + fh + FixedMul(16*FRACUNIT, actor->scale);
|
|
||||||
else
|
|
||||||
actor->z = actor->target->z + fh + FixedMul(16*FRACUNIT, actor->scale);
|
|
||||||
|
|
||||||
// Semi-lazy hack
|
// Semi-lazy hack
|
||||||
actor->angle = (angle_t)actor->extravalue1 + ANGLE_90;
|
actor->angle = (angle_t)actor->extravalue1 + ANGLE_90;
|
||||||
|
|
|
@ -799,19 +799,12 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
{
|
{
|
||||||
if (toucher->tracer) // Move the ideya over to the drone!
|
if (toucher->tracer) // Move the ideya over to the drone!
|
||||||
{
|
{
|
||||||
statenum_t currentstate = toucher->tracer->state - states;
|
|
||||||
mobj_t *hnext = special->hnext;
|
mobj_t *hnext = special->hnext;
|
||||||
P_SetTarget(&special->hnext, toucher->tracer);
|
P_SetTarget(&special->hnext, toucher->tracer);
|
||||||
P_SetTarget(&special->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
|
P_SetTarget(&special->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
|
||||||
P_SetTarget(&special->hnext->target, special);
|
P_SetTarget(&special->hnext->target, special->target ? special->target : special); // goalpost
|
||||||
|
|
||||||
// switch to centered orbit states
|
|
||||||
if (currentstate >= mobjinfo[MT_GOTEMERALD].missilestate
|
|
||||||
&& currentstate <= mobjinfo[MT_GOTEMERALD].missilestate + 4)
|
|
||||||
P_SetMobjState(toucher->tracer,
|
|
||||||
mobjinfo[MT_GOTEMERALD].raisestate + currentstate - mobjinfo[MT_GOTEMERALD].missilestate);
|
|
||||||
|
|
||||||
P_SetTarget(&toucher->tracer, NULL);
|
P_SetTarget(&toucher->tracer, NULL);
|
||||||
|
|
||||||
if (hnext)
|
if (hnext)
|
||||||
{
|
{
|
||||||
special->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
special->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
||||||
|
@ -821,19 +814,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
}
|
}
|
||||||
if (player->exiting) // ...then move it back?
|
if (player->exiting) // ...then move it back?
|
||||||
{
|
{
|
||||||
mobj_t *hnext = special;
|
mobj_t *hnext = special->target ? special->target : special; // goalpost
|
||||||
statenum_t currentstate;
|
|
||||||
while ((hnext = hnext->hnext))
|
while ((hnext = hnext->hnext))
|
||||||
{
|
|
||||||
P_SetTarget(&hnext->target, toucher);
|
P_SetTarget(&hnext->target, toucher);
|
||||||
currentstate = hnext->state - states;
|
|
||||||
|
|
||||||
// switch to regular orbit states
|
|
||||||
if (currentstate >= mobjinfo[MT_GOTEMERALD].raisestate
|
|
||||||
&& currentstate <= mobjinfo[MT_GOTEMERALD].raisestate + 4)
|
|
||||||
P_SetMobjState(hnext,
|
|
||||||
mobjinfo[MT_GOTEMERALD].missilestate + currentstate - mobjinfo[MT_GOTEMERALD].raisestate);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue