mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-16 17:51:27 +00:00
Fix wheels lingering after comeback
This commit is contained in:
parent
d726f82000
commit
6b222c4935
1 changed files with 12 additions and 0 deletions
12
src/p_mobj.c
12
src/p_mobj.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue