Fix segfault when ghost dies from a death pit

This commit is contained in:
Gustaf Alhäll 2023-06-19 22:19:39 +02:00
parent 331c81f32d
commit 17356f93bf
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD

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;
}