move -warp code to a later part of D_SRB2Main so G_LoadGameData isn't upset by G_SetGameModified

(cherry picked from commit 903cc311a711d80436215e7f7c897a447daf2539)
This commit is contained in:
Monster Iestyn 2020-02-20 20:31:11 +00:00 committed by James R
parent 93a76c10de
commit 31237935da

View file

@ -1282,20 +1282,6 @@ void D_SRB2Main(void)
}
}
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, true);
autostart = true;
}
}
cht_Init();
//---------------------------------------------------- READY SCREEN
@ -1353,6 +1339,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, true);
autostart = true;
}
}
// Initialize CD-Audio
if (M_CheckParm("-usecd") && !dedicated)
I_InitCD();