From 0e6e52eabe99c8d031ea736d4b5d26b24ab00efb Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 1 Jan 2017 17:03:13 +0000 Subject: [PATCH] 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 --- src/d_netcmd.c | 2 +- src/p_saveg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 7fd10d081..66c90f919 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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++; diff --git a/src/p_saveg.c b/src/p_saveg.c index 5e457ca3a..14386ff15 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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();