From 4642c75025d76d54ddf6ec383c117414d45c1bf9 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Sun, 12 Aug 2018 22:11:18 -0400 Subject: [PATCH 1/9] MT_IDEYAANCHOR info and spawn logic --- src/dehacked.c | 1 + src/info.c | 27 +++++++++++++++++++++++++++ src/info.h | 1 + src/p_mobj.c | 4 ++++ 4 files changed, 33 insertions(+) diff --git a/src/dehacked.c b/src/dehacked.c index 5c2953a55..e71b86774 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6844,6 +6844,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_NIGHTSEXTRATIME", "MT_NIGHTSLINKFREEZE", "MT_EGGCAPSULE", + "MT_IDEYAANCHOR", "MT_NIGHTOPIANHELPER", // the actual helper object that orbits you "MT_PIAN", // decorative singing friend "MT_SHLEEP", // almost-decorative sleeping enemy diff --git a/src/info.c b/src/info.c index fc30011bf..9a94a697d 100644 --- a/src/info.c +++ b/src/info.c @@ -16638,6 +16638,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, + { // MT_IDEYAANCHOR + 1717, // doomednum + S_INVISIBLE, // spawnstate + 0, // spawnhealth + S_NULL, // seestate + sfx_None, // seesound + 0, // reactiontime + sfx_None, // attacksound + S_NULL, // painstate + 0, // painchance + sfx_None, // painsound + S_NULL, // meleestate + S_NULL, // missilestate + S_NULL, // deathstate + S_NULL, // xdeathstate + sfx_None, // deathsound + 0, // speed + 1*FRACUNIT, // radius + 2*FRACUNIT, // height + 0, // display offset + 100, // mass + 0, // damage + sfx_None, // activesound + MF_NOBLOCKMAP|MF_NOSECTOR|MF_NOCLIP|MF_NOGRAVITY, // flags + S_NULL // raisestate + }, + { // MT_NIGHTOPIANHELPER -1, // doomednum S_NIGHTOPIANHELPER1, // spawnstate diff --git a/src/info.h b/src/info.h index a386b199a..77ac06f7f 100644 --- a/src/info.h +++ b/src/info.h @@ -4217,6 +4217,7 @@ typedef enum mobj_type MT_NIGHTSEXTRATIME, MT_NIGHTSLINKFREEZE, MT_EGGCAPSULE, + MT_IDEYAANCHOR, MT_NIGHTOPIANHELPER, // the actual helper object that orbits you MT_PIAN, // decorative singing friend MT_SHLEEP, // almost-decorative sleeping enemy diff --git a/src/p_mobj.c b/src/p_mobj.c index 5292ef15e..235779770 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10678,6 +10678,10 @@ ML_EFFECT4 : Don't clip inside the ground mobj->health = mthing->angle & 255; mobj->threshold = mthing->angle >> 8; break; + case MT_IDEYAANCHOR: + if (mthing->angle >= 0) + mobj->health = mthing->angle; + break; case MT_NIGHTSDRONE: { boolean flip = mthing->options & MTF_OBJECTFLIP; From 67ee9d082d5abffcbceffede847af7979d241028 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 02:09:00 -0400 Subject: [PATCH 2/9] A_OrbitNights: Move `donotrescale` to bit 19 * For compat with `nights-ideyaspawn` --- src/p_enemy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 06223eb7a..7a2baccfd 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8544,14 +8544,15 @@ void A_ToggleFlameJet(mobj_t* actor) // var1 = Angle adjustment (aka orbit speed) // var2: // Lower 16 bits: height offset -// Bits 17-20: set if object is Nightopian Helper -// Bits 21-24: set to not sync scale to player +// Bit 17: set if object is Nightopian Helper +// Bit 18: Unused +// Bit 19: set to not sync scale to player // void A_OrbitNights(mobj_t* actor) { INT32 ofs = (var2 & 0xFFFF); - boolean ishelper = (var2 & 0xF0000); - boolean donotrescale = (var2 & 0xF00000); + boolean ishelper = (var2 & 0x10000); + boolean donotrescale = (var2 & 0x40000); #ifdef HAVE_BLUA if (LUA_CallAction("A_OrbitNights", actor)) return; From 54cb7ddf329deed8ba12c26d6e6a8e1b19a29727 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 02:17:07 -0400 Subject: [PATCH 3/9] Anchor Ideya logic # Conflicts: # src/p_enemy.c # src/p_inter.c --- src/p_enemy.c | 35 ++++++++++++++++++++++++++++------- src/p_inter.c | 43 ++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 68 insertions(+), 10 deletions(-) diff --git a/src/p_enemy.c b/src/p_enemy.c index 7a2baccfd..c80b73c74 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -8543,21 +8543,42 @@ void A_ToggleFlameJet(mobj_t* actor) // // var1 = Angle adjustment (aka orbit speed) // var2: -// Lower 16 bits: height offset +// Bits 1-10: height offset, max 1023 +// Bits 11-16: X radius factor (max 63, default 20) // Bit 17: set if object is Nightopian Helper -// Bit 18: Unused -// Bit 19: set to not sync scale to player +// Bit 18: set to define X/Y/Z rotation factor +// Bits 19-20: Unused +// Bits 21-26: Y radius factor (max 63, default 32) +// Bits 27-32: Z radius factor (max 63, default 32) // +// If MF_GRENADEBOUNCE is flagged on mobj, use actor->threshold to define X/Y/Z radius factor, max 1023 each: +// Bits 1-10: X factor +// Bits 11-20: Y factor +// Bits 21-30: Z factor void A_OrbitNights(mobj_t* actor) { - INT32 ofs = (var2 & 0xFFFF); + INT32 ofs = (var2 & 0x3FF); boolean ishelper = (var2 & 0x10000); boolean donotrescale = (var2 & 0x40000); + INT32 xfactor = 32, yfactor = 32, zfactor = 20; #ifdef HAVE_BLUA if (LUA_CallAction("A_OrbitNights", actor)) return; #endif + if (actor->flags & MF_GRENADEBOUNCE) + { + xfactor = (actor->threshold & 0x3FF); + yfactor = (actor->threshold & 0xFFC00) >> 10; + zfactor = (actor->threshold & 0x3FF00000) >> 20; + } + else if (var2 & 0x20000) + { + xfactor = (var2 & 0xFC00) >> 10; + yfactor = (var2 & 0x3F00000) >> 20; + zfactor = (var2 & 0xFC000000) >> 26; + } + if (!actor->target || (actor->target->player && // if NiGHTS special stage and not NiGHTSmode. @@ -8576,9 +8597,9 @@ void A_OrbitNights(mobj_t* actor) const angle_t fa = (angle_t)actor->extravalue1 >> ANGLETOFINESHIFT; const angle_t ofa = ((angle_t)actor->extravalue1 + (ofs*ANG1)) >> ANGLETOFINESHIFT; - const fixed_t fc = FixedMul(FINECOSINE(fa),FixedMul(32*FRACUNIT, actor->scale)); - const fixed_t fh = FixedMul(FINECOSINE(ofa),FixedMul(20*FRACUNIT, actor->scale)); - const fixed_t fs = FixedMul(FINESINE(fa),FixedMul(32*FRACUNIT, actor->scale)); + const fixed_t fc = FixedMul(FINECOSINE(fa),FixedMul(xfactor*FRACUNIT, actor->scale)); + const fixed_t fh = FixedMul(FINECOSINE(ofa),FixedMul(zfactor*FRACUNIT, actor->scale)); + const fixed_t fs = FixedMul(FINESINE(fa),FixedMul(yfactor*FRACUNIT, actor->scale)); actor->x = actor->target->x + fc; actor->y = actor->target->y + fs; diff --git a/src/p_inter.c b/src/p_inter.c index 66c6bd852..b6cf5cf36 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -797,14 +797,47 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_NightserizePlayer(player, special->health); // Transform! if (!spec) { - if (toucher->tracer) // Move the ideya over to the drone! + if (toucher->tracer) // Move the ideya! { mobj_t *orbittarget = special->target ? special->target : special; - mobj_t *hnext = orbittarget->hnext; + mobj_t *hnext = orbittarget->hnext, *anchorpoint = NULL; + + if (toucher->tracer->type == MT_GOTEMERALD + && toucher->tracer->state-states >= S_ORBIDYA1 + && toucher->tracer->state-states <= S_ORBIDYA5) + { + mobj_t *mo2; + thinker_t *th; + UINT16 ideyanum = (toucher->tracer->state-states) - mobjinfo[MT_GOTEMERALD].missilestate; + + // scan the thinkers to find the corresponding anchorpoint + for (th = thinkercap.next; th != &thinkercap; th = th->next) + { + if (th->function.acp1 != (actionf_p1)P_MobjThinker) + continue; + + mo2 = (mobj_t *)th; + + if (mo2->type == MT_IDEYAANCHOR) + { + if(mo2->health == ideyanum) + { + anchorpoint = mo2; + break; + } + } + } + + if (anchorpoint) + { + toucher->tracer->flags |= MF_GRENADEBOUNCE; // custom radius factors + toucher->tracer->threshold = 8 << 20; // X factor 0, Y factor 0, Z factor 8 + } + } 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(&orbittarget->hnext->target, anchorpoint ? anchorpoint : orbittarget); // goalpost P_SetTarget(&toucher->tracer, NULL); if (hnext) @@ -818,7 +851,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) { mobj_t *hnext = special->target ? special->target : special; // goalpost while ((hnext = hnext->hnext)) + { + hnext->flags &= ~MF_GRENADEBOUNCE; + hnext->threshold = 0; P_SetTarget(&hnext->target, toucher); + } } return; } From 06bbafec2fbc035df9c20466139aedd714a055bc Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 02:17:29 -0400 Subject: [PATCH 4/9] Ideya anchoring optimization --- src/p_inter.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index b6cf5cf36..9639ff078 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -797,7 +797,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_NightserizePlayer(player, special->health); // Transform! if (!spec) { - if (toucher->tracer) // Move the ideya! + if (player->exiting) // Move existing Ideyas back to player + { + mobj_t *hnext = special->target ? special->target : special; // goalpost + while ((hnext = hnext->hnext)) + { + hnext->flags &= ~MF_GRENADEBOUNCE; + hnext->threshold = 0; + P_SetTarget(&hnext->target, toucher); + } + } + else if (toucher->tracer) // Move the Ideya to an anchor! { mobj_t *orbittarget = special->target ? special->target : special; mobj_t *hnext = orbittarget->hnext, *anchorpoint = NULL; @@ -847,16 +857,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) orbittarget->hnext->extravalue1 -= (72*ANG1)/orbittarget->hnext->extravalue1; } } - if (player->exiting) // ...then move it back? - { - mobj_t *hnext = special->target ? special->target : special; // goalpost - while ((hnext = hnext->hnext)) - { - hnext->flags &= ~MF_GRENADEBOUNCE; - hnext->threshold = 0; - P_SetTarget(&hnext->target, toucher); - } - } return; } From bec3a6884c24a52a6f51633fdfa246ed08b2d985 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 02:19:53 -0400 Subject: [PATCH 5/9] Make anchoring non-specific to Ideya states (now anchor anything!) # Conflicts: # src/p_inter.c --- src/p_inter.c | 42 ++++++++++++++++++------------------------ src/p_mobj.c | 1 + src/p_user.c | 2 ++ 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 9639ff078..2b00a7987 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -811,38 +811,32 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) { mobj_t *orbittarget = special->target ? special->target : special; mobj_t *hnext = orbittarget->hnext, *anchorpoint = NULL; + mobj_t *mo2; + thinker_t *th; + UINT16 ideyanum = toucher->tracer->health; - if (toucher->tracer->type == MT_GOTEMERALD - && toucher->tracer->state-states >= S_ORBIDYA1 - && toucher->tracer->state-states <= S_ORBIDYA5) + // scan the thinkers to find the corresponding anchorpoint + for (th = thinkercap.next; th != &thinkercap; th = th->next) { - mobj_t *mo2; - thinker_t *th; - UINT16 ideyanum = (toucher->tracer->state-states) - mobjinfo[MT_GOTEMERALD].missilestate; + if (th->function.acp1 != (actionf_p1)P_MobjThinker) + continue; - // scan the thinkers to find the corresponding anchorpoint - for (th = thinkercap.next; th != &thinkercap; th = th->next) + mo2 = (mobj_t *)th; + + if (mo2->type == MT_IDEYAANCHOR) { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - mo2 = (mobj_t *)th; - - if (mo2->type == MT_IDEYAANCHOR) + if(mo2->health == ideyanum) { - if(mo2->health == ideyanum) - { - anchorpoint = mo2; - break; - } + anchorpoint = mo2; + break; } } + } - if (anchorpoint) - { - toucher->tracer->flags |= MF_GRENADEBOUNCE; // custom radius factors - toucher->tracer->threshold = 8 << 20; // X factor 0, Y factor 0, Z factor 8 - } + if (anchorpoint) + { + toucher->tracer->flags |= MF_GRENADEBOUNCE; // custom radius factors + toucher->tracer->threshold = 8 << 20; // X factor 0, Y factor 0, Z factor 8 } P_SetTarget(&orbittarget->hnext, toucher->tracer); diff --git a/src/p_mobj.c b/src/p_mobj.c index 235779770..5b142cc6e 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9610,6 +9610,7 @@ void P_SpawnPlayer(INT32 playernum) if (p == players) // this is totally the wrong place to do this aaargh. { mobj_t *idya = P_SpawnMobjFromMobj(mobj, 0, 0, mobj->height, MT_GOTEMERALD); + idya->health = 0; // for identification P_SetTarget(&idya->target, mobj); P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate); P_SetTarget(&mobj->tracer, idya); diff --git a/src/p_user.c b/src/p_user.c index 8c50b5095..27e26e2c2 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6055,6 +6055,7 @@ static void P_DoNiGHTSCapsule(player_t *player) UINT8 em = P_GetNextEmerald(); // Only give it to ONE person, and THAT player has to get to the goal! mobj_t *emmo = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD); + emmo->health = em; // for identification P_SetTarget(&emmo->target, player->mo); P_SetMobjState(emmo, mobjinfo[MT_GOTEMERALD].meleestate + em); P_SetTarget(&player->mo->tracer, emmo); @@ -6081,6 +6082,7 @@ static void P_DoNiGHTSCapsule(player_t *player) }*/ mobj_t *idya = P_SpawnMobjFromMobj(player->mo, 0, 0, player->mo->height, MT_GOTEMERALD); idya->extravalue2 = player->mare/5; + idya->health = player->mare + 1; // for identification P_SetTarget(&idya->target, player->mo); P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate + ((player->mare + 1) % 5)); P_SetTarget(&player->mo->tracer, idya); From 9f67ee1a891e9515616aa7962609fb5102553135 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Mon, 13 Aug 2018 03:18:23 -0400 Subject: [PATCH 6/9] MT_IDEYAANCHOR: Use type 1714 instead of 1717 --- src/info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/info.c b/src/info.c index 9a94a697d..55d56eb5d 100644 --- a/src/info.c +++ b/src/info.c @@ -16639,7 +16639,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = }, { // MT_IDEYAANCHOR - 1717, // doomednum + 1714, // doomednum S_INVISIBLE, // spawnstate 0, // spawnhealth S_NULL, // seestate From 655b590c069f84f3e48ea75b5397b54aaa1829fe Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 14 Aug 2018 17:28:51 -0400 Subject: [PATCH 7/9] Ideya fixes when a player has more than one Ideya # Conflicts: # src/p_inter.c # Conflicts: # src/p_inter.c --- src/p_inter.c | 11 +++++++---- src/p_user.c | 8 ++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index 2b00a7987..a1dbdf9b9 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -840,8 +840,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) } 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, anchorpoint ? anchorpoint : orbittarget); // goalpost + if (!orbittarget->hnext->hnext) + P_SetTarget(&orbittarget->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo. + else + P_SetTarget(&orbittarget->hnext->hnext->target, anchorpoint ? anchorpoint : orbittarget); + P_SetTarget(&orbittarget->hnext->target, anchorpoint ? anchorpoint : orbittarget); P_SetTarget(&toucher->tracer, NULL); if (hnext) @@ -993,8 +996,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (player->powers[pw_carry] == CR_NIGHTSMODE && !toucher->target) return; - if (toucher->tracer) - return; // Don't have multiple ideya + if (toucher->tracer && toucher->tracer->health > 0) + return; // Don't have multiple ideya, unless it's the first one given (health = 0) if (player->mare != special->threshold) // wrong mare return; diff --git a/src/p_user.c b/src/p_user.c index 27e26e2c2..877910f25 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6085,6 +6085,14 @@ static void P_DoNiGHTSCapsule(player_t *player) idya->health = player->mare + 1; // for identification P_SetTarget(&idya->target, player->mo); P_SetMobjState(idya, mobjinfo[MT_GOTEMERALD].missilestate + ((player->mare + 1) % 5)); + + if (player->mo->tracer) + { + P_SetTarget(&idya->hnext, player->mo->tracer); + idya->extravalue1 = (angle_t)(player->mo->tracer->extravalue1 - 72*ANG1); + if (idya->extravalue1 > player->mo->tracer->extravalue1) + idya->extravalue1 -= (72*ANG1)/idya->extravalue1; + } P_SetTarget(&player->mo->tracer, idya); } for (i = 0; i < MAXPLAYERS; i++) From ac79f6975c58664e73d7d5f2bae32879b3539c0a Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 14 Aug 2018 17:48:14 -0400 Subject: [PATCH 8/9] Look for two anchorpoints if player has two Ideyas * Undid "optimization" of checking player->exiting first because the last Ideya's orbit won't be adjusted --- src/p_inter.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/src/p_inter.c b/src/p_inter.c index a1dbdf9b9..7e6dee859 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -797,24 +797,15 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) P_NightserizePlayer(player, special->health); // Transform! if (!spec) { - if (player->exiting) // Move existing Ideyas back to player - { - mobj_t *hnext = special->target ? special->target : special; // goalpost - while ((hnext = hnext->hnext)) - { - hnext->flags &= ~MF_GRENADEBOUNCE; - hnext->threshold = 0; - P_SetTarget(&hnext->target, toucher); - } - } - else if (toucher->tracer) // Move the Ideya to an anchor! + if (toucher->tracer) // Move the Ideya to an anchor! { mobj_t *orbittarget = special->target ? special->target : special; - mobj_t *hnext = orbittarget->hnext, *anchorpoint = NULL; + mobj_t *hnext = orbittarget->hnext, *anchorpoint = NULL, *anchorpoint2 = NULL; mobj_t *mo2; thinker_t *th; - UINT16 ideyanum = toucher->tracer->health; + // The player might have two Ideyas: toucher->tracer and toucher->tracer->hnext + // so handle their anchorpoints accordingly. // scan the thinkers to find the corresponding anchorpoint for (th = thinkercap.next; th != &thinkercap; th = th->next) { @@ -825,11 +816,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) if (mo2->type == MT_IDEYAANCHOR) { - if(mo2->health == ideyanum) - { + if (mo2->health == toucher->tracer->health) // do ideya numberes match? anchorpoint = mo2; + else if (toucher->tracer->hnext && mo2->health == toucher->tracer->hnext->health) + anchorpoint2 = mo2; + + if ((!toucher->tracer->hnext && anchorpoint) + || (toucher->tracer->hnext && anchorpoint && anchorpoint2)) break; - } } } @@ -839,11 +833,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) toucher->tracer->threshold = 8 << 20; // X factor 0, Y factor 0, Z factor 8 } + if (anchorpoint2) + { + toucher->tracer->hnext->flags |= MF_GRENADEBOUNCE; // custom radius factors + toucher->tracer->hnext->threshold = 8 << 20; // X factor 0, Y factor 0, Z factor 8 + } + P_SetTarget(&orbittarget->hnext, toucher->tracer); if (!orbittarget->hnext->hnext) P_SetTarget(&orbittarget->hnext->hnext, hnext); // Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo. else - P_SetTarget(&orbittarget->hnext->hnext->target, anchorpoint ? anchorpoint : orbittarget); + P_SetTarget(&orbittarget->hnext->hnext->target, anchorpoint2 ? anchorpoint2 : orbittarget); P_SetTarget(&orbittarget->hnext->target, anchorpoint ? anchorpoint : orbittarget); P_SetTarget(&toucher->tracer, NULL); @@ -854,6 +854,16 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck) orbittarget->hnext->extravalue1 -= (72*ANG1)/orbittarget->hnext->extravalue1; } } + if (player->exiting) // ...then move it back? + { + mobj_t *hnext = special->target ? special->target : special; // goalpost + while ((hnext = hnext->hnext)) + { + hnext->flags &= ~MF_GRENADEBOUNCE; + hnext->threshold = 0; + P_SetTarget(&hnext->target, toucher); + } + } return; } From d01ca9fe95320707d69dfb357e49448e6ed42d8a Mon Sep 17 00:00:00 2001 From: mazmazz Date: Thu, 16 Aug 2018 11:25:35 -0400 Subject: [PATCH 9/9] Make Ideya Anchor use parameter # instead of angle for Ideya ID --- src/p_mobj.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index d29603cbd..bd10b4591 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10682,8 +10682,7 @@ ML_EFFECT4 : Don't clip inside the ground mobj->threshold = mthing->angle >> 8; break; case MT_IDEYAANCHOR: - if (mthing->angle >= 0) - mobj->health = mthing->angle; + mobj->health = mthing->extrainfo; break; case MT_NIGHTSDRONE: {