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.
This commit is contained in:
parent
617d9f9f7b
commit
2c50b2ee58
1 changed files with 2 additions and 28 deletions
26
src/p_mobj.c
26
src/p_mobj.c
|
|
@ -6241,22 +6241,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.
|
||||
|
|
@ -8175,9 +8159,6 @@ 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);
|
||||
return false;
|
||||
// Flung items
|
||||
|
|
@ -8185,15 +8166,8 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
if (P_MobjWasRemoved(mobj))
|
||||
return false;
|
||||
|
||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||
P_NightsItemChase(mobj);
|
||||
else
|
||||
A_AttractChase(mobj);
|
||||
break;
|
||||
case MT_EMBLEM:
|
||||
if (mobj->flags2 & MF2_NIGHTSPULL)
|
||||
P_NightsItemChase(mobj);
|
||||
break;
|
||||
case MT_FLOATINGITEM:
|
||||
{
|
||||
if (mobj->flags & MF_NOCLIPTHING)
|
||||
|
|
|
|||
Loading…
Reference in a new issue