mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Make the h-chain repairing safer.
This commit is contained in:
parent
1c51872033
commit
bc6bfec7ea
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…
Add table
Reference in a new issue