Fix wheels lingering after comeback

This commit is contained in:
SeventhSentinel 2018-06-25 07:41:49 -04:00
parent d726f82000
commit 6b222c4935
1 changed files with 12 additions and 0 deletions

View File

@ -9343,6 +9343,18 @@ void P_RemoveMobj(mobj_t *mobj)
if (mobj->type == MT_SHADOW)
P_RemoveShadow(mobj);
if (mobj->type == MT_KARMAHITBOX)
{
mobj_t *cur = mobj->hnext;
while (cur && !P_MobjWasRemoved(cur))
{
mobj_t *prev = cur; // Kind of a dumb var, but we need to set cur before we remove the mobj
cur = cur->hnext;
P_RemoveMobj(prev);
}
}
mobj->health = 0; // Just because
// unlink from sector and block lists