Fix sector floordata/ceilingdata/lightingdata pointers not being NULL when they should be

This fixes ERCZ's lava falls not moving after joining a netgame at that stage. Possibly explains other various floor/ceiling related netgame quirks that haven't been noticed until now, maybe even in multiplayer levels.
This commit is contained in:
Monster Iestyn 2017-01-03 18:47:46 +00:00
parent be21588761
commit a0d095e707
1 changed files with 7 additions and 0 deletions

View File

@ -2607,6 +2607,7 @@ static void P_NetUnArchiveThinkers(void)
thinker_t *next;
UINT8 tclass;
UINT8 restoreNum = false;
UINT32 i;
if (READUINT32(save_p) != ARCHIVEBLOCK_THINKERS)
I_Error("Bad $$$.sav at archive block Thinkers");
@ -2627,6 +2628,12 @@ static void P_NetUnArchiveThinkers(void)
iquetail = iquehead = 0;
P_InitThinkers();
// clear sector thinker pointers so they don't point to non-existant thinkers for all of eternity
for (i = 0; i < numsectors; i++)
{
sectors[i].floordata = sectors[i].ceilingdata = sectors[i].lightingdata = NULL;
}
// read in saved thinkers
for (;;)
{