mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
Make the h-chain repairing safer.
This commit is contained in:
parent
5ac70bbb7e
commit
0102da824e
1 changed files with 2 additions and 2 deletions
|
@ -8673,9 +8673,9 @@ void P_RemoveMobj(mobj_t *mobj)
|
|||
// Remove any references to other mobjs.
|
||||
P_SetTarget(&mobj->target, P_SetTarget(&mobj->tracer, NULL));
|
||||
|
||||
if (mobj->hnext)
|
||||
if (mobj->hnext && !P_MobjWasRemoved(mobj->hnext))
|
||||
P_SetTarget(&mobj->hnext->hprev, mobj->hprev);
|
||||
if (mobj->hprev)
|
||||
if (mobj->hprev && !P_MobjWasRemoved(mobj->hprev))
|
||||
P_SetTarget(&mobj->hprev->hnext, mobj->hnext);
|
||||
|
||||
P_SetTarget(&mobj->hnext, P_SetTarget(&mobj->hprev, NULL));
|
||||
|
|
Loading…
Reference in a new issue