Fix resync crash
This commit is contained in:
parent
b87868d07e
commit
a02fbacf01
1 changed files with 7 additions and 9 deletions
16
src/p_mobj.c
16
src/p_mobj.c
|
|
@ -11733,9 +11733,9 @@ void P_FreePrecipMobj(precipmobj_t *mobj)
|
||||||
// Clearing out stuff for savegames
|
// Clearing out stuff for savegames
|
||||||
void P_RemoveSavegameMobj(mobj_t *mobj)
|
void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||||
{
|
{
|
||||||
// unlink from sector and block lists
|
|
||||||
if (((thinker_t *)mobj)->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
if (((thinker_t *)mobj)->function.acp1 == (actionf_p1)P_NullPrecipThinker)
|
||||||
{
|
{
|
||||||
|
// unlink from sector and block lists
|
||||||
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
P_UnsetPrecipThingPosition((precipmobj_t *)mobj);
|
||||||
|
|
||||||
if (precipsector_list)
|
if (precipsector_list)
|
||||||
|
|
@ -11758,20 +11758,18 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
|
||||||
P_DelSeclist(sector_list);
|
P_DelSeclist(sector_list);
|
||||||
sector_list = NULL;
|
sector_list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
P_DeleteMobjStringArgs(mobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
// stop any playing sound
|
// stop any playing sound
|
||||||
S_StopSound(mobj);
|
S_StopSound(mobj);
|
||||||
R_RemoveMobjInterpolator(mobj);
|
|
||||||
P_DeleteMobjStringArgs(mobj);
|
|
||||||
|
|
||||||
|
R_RemoveMobjInterpolator(mobj);
|
||||||
|
|
||||||
|
// free block
|
||||||
// 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
|
// 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
|
||||||
{
|
P_UnlinkThinker((thinker_t*)mobj);
|
||||||
thinker_t *thinker = (thinker_t *)mobj;
|
|
||||||
thinker_t *next = thinker->next;
|
|
||||||
(next->prev = thinker->prev)->next = next;
|
|
||||||
Z_Free(thinker);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
static CV_PossibleValue_t respawnitemtime_cons_t[] = {{1, "MIN"}, {300, "MAX"}, {0, NULL}};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue