From 1abc097bb521e59495edea1e06d6a5923fac9da4 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Mon, 15 May 2023 20:31:53 -0400 Subject: [PATCH] Remove P_NightsItemChase Keeps being called in some strange instance by rings, even though the case that calls it shouldn't happen, and causing a crash -- just delete it. --- src/p_mobj.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index d9c502ec1..fbe4d90c2 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -5016,22 +5016,6 @@ void P_Attract(mobj_t *source, mobj_t *dest, boolean nightsgrab) // Home in on y } } -static void P_NightsItemChase(mobj_t *thing) -{ - if (!thing->tracer) - { - P_SetTarget(&thing->tracer, NULL); - thing->flags2 &= ~MF2_NIGHTSPULL; - thing->movefactor = 0; - return; - } - - if (!thing->tracer->player) - return; - - P_Attract(thing, thing->tracer, true); -} - // // P_MaceRotate // Spins a hnext-chain of objects around its centerpoint, side to side or periodically. @@ -7091,20 +7075,14 @@ static boolean P_MobjRegularThink(mobj_t *mobj) // No need to check water. Who cares? P_RingThinker(mobj); - if (mobj->flags2 & MF2_NIGHTSPULL) - P_NightsItemChase(mobj); - else - A_AttractChase(mobj); + A_AttractChase(mobj); return false; // Flung items case MT_FLINGRING: if (P_MobjWasRemoved(mobj)) return false; - if (mobj->flags2 & MF2_NIGHTSPULL) - P_NightsItemChase(mobj); - else - A_AttractChase(mobj); + A_AttractChase(mobj); break; case MT_DEBTSPIKE: if (mobj->fuse == 0 && P_GetMobjFeet(mobj) == P_GetMobjGround(mobj))