mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
move -warp code to a later part of D_SRB2Main so G_LoadGameData isn't upset by G_SetGameModified
This commit is contained in:
parent
42f141d32f
commit
7ee6ff2b03
1 changed files with 16 additions and 14 deletions
30
src/d_main.c
30
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
|
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();
|
cht_Init();
|
||||||
|
|
||||||
//---------------------------------------------------- READY SCREEN
|
//---------------------------------------------------- READY SCREEN
|
||||||
|
|
@ -1307,6 +1293,22 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
//------------------------------------------------ COMMAND LINE PARAMS
|
//------------------------------------------------ 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
|
// Initialize CD-Audio
|
||||||
if (M_CheckParm("-usecd") && !dedicated)
|
if (M_CheckParm("-usecd") && !dedicated)
|
||||||
I_InitCD();
|
I_InitCD();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue