From 3d5ee263e0072504af0ef87cac8fc967dc2050ac Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 6 Jul 2018 21:19:35 +0100 Subject: [PATCH 1/2] Fix a crashy oversight in the archiving! --- src/p_saveg.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/p_saveg.c b/src/p_saveg.c index b98cf3e48..68191a582 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3384,14 +3384,17 @@ void P_SaveNetGame(void) P_NetArchiveMisc(); // Assign the mobjnumber for pointer tracking - for (th = thinkercap.next; th != &thinkercap; th = th->next) + if (gamestate == GS_LEVEL) { - if (th->function.acp1 == (actionf_p1)P_MobjThinker) + for (th = thinkercap.next; th != &thinkercap; th = th->next) { - mobj = (mobj_t *)th; - if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER) - continue; - mobj->mobjnum = i++; + if (th->function.acp1 == (actionf_p1)P_MobjThinker) + { + mobj = (mobj_t *)th; + if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER) + continue; + mobj->mobjnum = i++; + } } } From 8750feb196ac638b65922b2fbb1d4028d53d2771 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 6 Jul 2018 21:50:04 +0100 Subject: [PATCH 2/2] Remove the need for sending the savegame if you're the host. You don't need to send it to yourself. What are you doing? --- src/d_clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 4935632f6..81ffc76c1 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3535,7 +3535,7 @@ static void HandleConnect(SINT8 node) #ifdef JOININGAME if (nodewaiting[node]) { - if (newnode) + if (node && newnode) { SV_SendSaveGame(node); // send a complete game state DEBFILE("send savegame\n");