mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Remove usage of currentthinker from direct removal
It's designed to be referenced from P_RunTHinkers, whjich we aren't doing
This commit is contained in:
parent
3d311eeae3
commit
c24a0d0a47
1 changed files with 9 additions and 2 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -10323,10 +10323,17 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
|
|||
|
||||
// stop any playing sound
|
||||
S_StopSound(mobj);
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
|
||||
// free block
|
||||
P_RemoveThinkerDelayed((thinker_t *)mobj); // Call directly here since we are calling P_InitThinkers
|
||||
R_RemoveMobjInterpolator(mobj);
|
||||
// Here we use the same code as R_RemoveThinkerDelayed, but without reference counting (we're removing everything so it shouldn't matter) and without touching currentthinker since we aren't in P_RunThinkers
|
||||
{
|
||||
thinker_t *thinker = (thinker_t *)mobj;
|
||||
thinker_t *next = thinker->next;
|
||||
(next->prev = thinker->prev)->next = next;
|
||||
R_DestroyLevelInterpolators(thinker);
|
||||
Z_Free(thinker);
|
||||
}
|
||||
}
|
||||
|
||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||
|
|
Loading…
Reference in a new issue