From c7fd22f98a8d26c179469e66192a5d513bee8b36 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sat, 19 Oct 2019 12:08:15 +0200 Subject: [PATCH 1/2] Fixed a netgame crash that was caused by a closing brace being in the wrong place :v --- src/p_saveg.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/p_saveg.c b/src/p_saveg.c index 69c942236..ff9f3bf06 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3612,21 +3612,21 @@ static void P_NetUnArchiveThinkers(void) } CONS_Debug(DBG_NETPLAY, "%u thinkers loaded in list %d\n", numloaded, i); - } - if (restoreNum) - { - executor_t *delay = NULL; - UINT32 mobjnum; - for (currentthinker = thlist[i].next; currentthinker != &thlist[i]; - currentthinker = currentthinker->next) + if (restoreNum) { - if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay) - continue; - delay = (void *)currentthinker; - if (!(mobjnum = (UINT32)(size_t)delay->caller)) - continue; - delay->caller = P_FindNewPosition(mobjnum); + executor_t *delay = NULL; + UINT32 mobjnum; + for (currentthinker = thlist[i].next; currentthinker != &thlist[i]; + currentthinker = currentthinker->next) + { + if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay) + continue; + delay = (void *)currentthinker; + if (!(mobjnum = (UINT32)(size_t)delay->caller)) + continue; + delay->caller = P_FindNewPosition(mobjnum); + } } } } From 73c39990f96730fc12b13aa8238e260068294381 Mon Sep 17 00:00:00 2001 From: MascaraSnake Date: Sat, 19 Oct 2019 14:51:24 +0200 Subject: [PATCH 2/2] Fix restoration of delayed linedef executors in P_NetUnArchiveThinkers for real --- src/p_saveg.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/p_saveg.c b/src/p_saveg.c index ff9f3bf06..fb2365bf0 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3612,21 +3612,21 @@ static void P_NetUnArchiveThinkers(void) } CONS_Debug(DBG_NETPLAY, "%u thinkers loaded in list %d\n", numloaded, i); + } - if (restoreNum) + if (restoreNum) + { + executor_t *delay = NULL; + UINT32 mobjnum; + for (currentthinker = thlist[THINK_MAIN].next; currentthinker != &thlist[THINK_MAIN]; + currentthinker = currentthinker->next) { - executor_t *delay = NULL; - UINT32 mobjnum; - for (currentthinker = thlist[i].next; currentthinker != &thlist[i]; - currentthinker = currentthinker->next) - { - if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay) - continue; - delay = (void *)currentthinker; - if (!(mobjnum = (UINT32)(size_t)delay->caller)) - continue; - delay->caller = P_FindNewPosition(mobjnum); - } + if (currentthinker->function.acp1 != (actionf_p1)T_ExecutorDelay) + continue; + delay = (void *)currentthinker; + if (!(mobjnum = (UINT32)(size_t)delay->caller)) + continue; + delay->caller = P_FindNewPosition(mobjnum); } } }