mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix segfault when killing wall spike while it moves
This commit is contained in:
parent
3c81938496
commit
8b77af7378
1 changed files with 5 additions and 0 deletions
|
@ -10061,6 +10061,8 @@ static boolean P_FuseThink(mobj_t *mobj)
|
|||
case MT_SPIKE:
|
||||
case MT_WALLSPIKE:
|
||||
P_SetMobjState(mobj, mobj->state->nextstate);
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
return false;
|
||||
mobj->fuse = mobj->spawnpoint ? mobj->spawnpoint->args[0] : mobj->info->speed;
|
||||
break;
|
||||
case MT_NIGHTSCORE:
|
||||
|
@ -10222,6 +10224,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
if (mobj->flags2 & MF2_FIRING)
|
||||
P_FiringThink(mobj);
|
||||
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
return;
|
||||
|
||||
if (mobj->type == MT_AMBIENT)
|
||||
{
|
||||
if (leveltime % mobj->health)
|
||||
|
|
Loading…
Reference in a new issue