Merge branch 'savegame-hotfix' into 'next'

Savegame hotfix

This fixes the first mobj thinker added/read from $$$.sav not being relinked to other objects as their target/tracer/etc properly. In particular, this fixes Brak's electric shield disappearing for anyone joining a netgame playing ERCZ (as Brak happens to be the first object added/read in this case, and Brak is the shield's target).

See merge request !146
This commit is contained in:
Monster Iestyn 2017-01-02 00:03:51 -05:00
commit 853f1f5a1f
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();