Fixed followmobj not getting deleted when removing mobjs. Why did I do it in this branch? I've got lots related to followmobjs to do here for demo purposes, so...

This commit is contained in:
toasterbabe 2017-10-12 13:15:24 +01:00
parent f75d56f932
commit 31dff22202
1 changed files with 6 additions and 0 deletions

View File

@ -8587,6 +8587,12 @@ void P_RemoveMobj(mobj_t *mobj)
if (mobj->type == MT_OVERLAY)
P_RemoveOverlay(mobj);
if (mobj->player && mobj->player->followmobj)
{
P_RemoveMobj(mobj->player->followmobj);
mobj->player->followmobj = NULL;
}
mobj->health = 0; // Just because
// unlink from sector and block lists