mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-15 01:01:43 +00:00
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:
parent
93a76c10de
commit
31237935da
1 changed files with 16 additions and 14 deletions
30
src/d_main.c
30
src/d_main.c
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue