A_OrbitNights make actor scale to target

* Added `donotrescale` input to disable this behavior
* Reverted previous commit changes for scaling Ideya because unneeded
This commit is contained in:
mazmazz 2018-08-12 01:07:26 -04:00
parent aecabb246d
commit 43b790c26f
3 changed files with 8 additions and 12 deletions

View File

@ -8544,12 +8544,14 @@ void A_ToggleFlameJet(mobj_t* actor)
// var1 = Angle adjustment (aka orbit speed)
// var2:
// Lower 16 bits: height offset
// Upper 16 bits: set if object is Nightopian Helper
// Bits 17-20: set if object is Nightopian Helper
// Bits 21-24: set to not sync scale to player
//
void A_OrbitNights(mobj_t* actor)
{
INT32 ofs = (var2 & 0xFFFF);
boolean ishelper = var2 >> 16;
boolean ishelper = (var2 & 0xF0000);
boolean donotrescale = (var2 & 0xF00000);
#ifdef HAVE_BLUA
if (LUA_CallAction("A_OrbitNights", actor))
return;
@ -8594,6 +8596,9 @@ void A_OrbitNights(mobj_t* actor)
else
actor->flags2 &= ~MF2_DONTDRAW;
}
if (!donotrescale && actor->destscale != actor->target->destscale)
actor->destscale = actor->target->destscale;
}
}

View File

@ -807,8 +807,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_SetTarget(&orbittarget->hnext->target, orbittarget); // goalpost
P_SetTarget(&toucher->tracer, NULL);
orbittarget->hnext->destscale = orbittarget->destscale;
if (hnext)
{
orbittarget->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);

View File

@ -7883,14 +7883,7 @@ void P_MobjThinker(mobj_t *mobj)
|| flipchanged
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
{
if (goalpost->destscale != mobj->destscale)
{
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
// get the orbiting ideyas and scale them too
mobj_t *hnext = goalpost;
while ((hnext = hnext->hnext))
hnext->destscale = mobj->destscale;
}
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
if (!flip)