Merge branch 'fix-death-ghost-segfault' into 'next'

Fix segfault when ghost dies from a death pit

Closes #999

See merge request STJr/SRB2!2026
This commit is contained in:
sphere 2023-06-19 22:31:55 +00:00
commit c1d3af0449

View file

@ -3139,7 +3139,8 @@ boolean P_SceneryZMovement(mobj_t *mo)
if (P_CheckDeathPitCollide(mo))
{
P_RemoveMobj(mo);
if (mo->type != MT_GHOST) // ghosts play death animations instead, so don't remove them
P_RemoveMobj(mo);
return false;
}