Start mobjnums at 1 instead of 0, so that the first found mobj can be relinked as a target etc to other mobjs properly

This fixes Brak's electric barrier disappearing for joiners to ERZC. There seems to be some issues with the lava falls there too I've found, but the electric barrier actually stays around now at least
This commit is contained in:
Monster Iestyn 2017-01-01 17:03:13 +00:00
parent f4b0591174
commit 0e6e52eabe
2 changed files with 2 additions and 2 deletions

View File

@ -3960,7 +3960,7 @@ static void Command_Archivetest_f(void)
}
// assign mobjnum
i = 0;
i = 1;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
((mobj_t *)th)->mobjnum = i++;

View File

@ -3285,7 +3285,7 @@ void P_SaveNetGame(void)
{
thinker_t *th;
mobj_t *mobj;
INT32 i = 0;
INT32 i = 1; // don't start from 0, it'd be confused with a blank pointer otherwise
CV_SaveNetVars(&save_p);
P_NetArchiveMisc();