From 903cc311a711d80436215e7f7c897a447daf2539 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 20 Feb 2020 20:31:11 +0000 Subject: [PATCH 1/2] move -warp code to a later part of D_SRB2Main so G_LoadGameData isn't upset by G_SetGameModified --- src/d_main.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 1f35ff64c..85e67b92d 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1230,20 +1230,6 @@ void D_SRB2Main(void) mainwadstally = packetsizetally; // technically not accurate atm, remember to port the two-stage -file process from kart in 2.2.x - if (M_CheckParm("-warp") && M_IsNextParm()) - { - const char *word = M_GetNextParm(); - pstartmap = G_FindMapByNameOrCode(word, 0); - if (! pstartmap) - I_Error("Cannot find a map remotely named '%s'\n", word); - else - { - if (!M_CheckParm("-server")) - G_SetGameModified(true); - autostart = true; - } - } - cht_Init(); //---------------------------------------------------- READY SCREEN @@ -1307,6 +1293,22 @@ void D_SRB2Main(void) //------------------------------------------------ COMMAND LINE PARAMS + // this must be done after loading gamedata, to avoid setting off the corrupted gamedata flag in G_LoadGameData + // -- Monster Iestyn 20/02/20 + if (M_CheckParm("-warp") && M_IsNextParm()) + { + const char *word = M_GetNextParm(); + pstartmap = G_FindMapByNameOrCode(word, 0); + if (! pstartmap) + I_Error("Cannot find a map remotely named '%s'\n", word); + else + { + if (!M_CheckParm("-server")) + G_SetGameModified(true); + autostart = true; + } + } + // Initialize CD-Audio if (M_CheckParm("-usecd") && !dedicated) I_InitCD(); From 5c33ff04581abe44e1c8ad03e680ff918b9dc0d2 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 20 Feb 2020 20:38:01 +0000 Subject: [PATCH 2/2] clarify the situation a bit more in the comments --- src/d_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/d_main.c b/src/d_main.c index 85e67b92d..859a7ff25 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -1293,7 +1293,8 @@ void D_SRB2Main(void) //------------------------------------------------ COMMAND LINE PARAMS - // this must be done after loading gamedata, to avoid setting off the corrupted gamedata flag in G_LoadGameData + // this must be done after loading gamedata, + // to avoid setting off the corrupted gamedata code in G_LoadGameData if a SOC with custom gamedata is added // -- Monster Iestyn 20/02/20 if (M_CheckParm("-warp") && M_IsNextParm()) {