From aecabb246d37e0fe741ace0f49b8d71db4278995 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sat, 11 Aug 2018 23:53:07 -0400 Subject: [PATCH] Scale Ideyas when moving to/from NIGHTSDRONE and scaling changes to NIGHTSDRONE --- src/p_inter.c | 3 +++ src/p_mobj.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index 454f09591..e05f18364 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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); diff --git a/src/p_mobj.c b/src/p_mobj.c index 3aa68e521..2450743b7 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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)