P_NetUnArchiveThinkers: set thinker references to 0 before removing

Fixes failed assertion on server join (resolves #514)
This commit is contained in:
toaster 2023-04-13 20:39:40 +01:00
parent ebb2d83799
commit 32d59372d3

View file

@ -4337,6 +4337,8 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save)
{
next = currentthinker->next;
currentthinker->references = 0; // Heinous but this is the only place the assertion in P_UnlinkThinkers is wrong
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