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:
Ashnal 2022-09-29 15:43:50 -04:00
parent 3d311eeae3
commit c24a0d0a47
1 changed files with 9 additions and 2 deletions

View File

@ -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}};