mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 05:00:46 +00:00
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:
parent
f75d56f932
commit
31dff22202
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue