Unlink non-mobj and non-precip thinkers when loading and freeing

Move globalweather to before P_SpawnSpecials so that specials can properly change weather and have it communicated in savegames

# Conflicts:
#	src/p_saveg.c
#	src/p_setup.c
This commit is contained in:
Ashnal 2022-09-29 19:22:53 -04:00 committed by toaster
parent fb4cf4c3ba
commit 1e9b844e88
2 changed files with 4 additions and 1 deletions

View file

@ -10802,7 +10802,6 @@ void P_RemoveSavegameMobj(mobj_t *mobj)
thinker_t *thinker = (thinker_t *)mobj;
thinker_t *next = thinker->next;
(next->prev = thinker->prev)->next = next;
R_DestroyLevelInterpolators(thinker);
Z_Free(thinker);
}
}

View file

@ -3984,7 +3984,11 @@ static void P_NetUnArchiveThinkers(void)
if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker || currentthinker->function.acp1 == (actionf_p1)P_NullPrecipThinker)
P_RemoveSavegameMobj((mobj_t *)currentthinker); // item isn't saved, don't remove it
else
{
(next->prev = currentthinker->prev)->next = next;
R_DestroyLevelInterpolators(currentthinker);
Z_Free(currentthinker);
}
}
}