Scale Ideyas when moving to/from NIGHTSDRONE and scaling changes to NIGHTSDRONE

This commit is contained in:
mazmazz 2018-08-11 23:53:07 -04:00
parent 9bc9f96e09
commit aecabb246d
2 changed files with 11 additions and 1 deletions

View File

@ -801,11 +801,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
{
mobj_t *orbittarget = special->target ? special->target : special;
mobj_t *hnext = orbittarget->hnext;
P_SetTarget(&orbittarget->hnext, toucher->tracer);
P_SetTarget(&orbittarget->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo.
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,7 +7883,14 @@ void P_MobjThinker(mobj_t *mobj)
|| flipchanged
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
{
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
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;
}
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
if (!flip)