(+indentation fix)
This commit is contained in:
yellowtd 2017-05-12 20:47:42 -04:00
parent 7f83e0d134
commit 13c748531f
2 changed files with 27 additions and 0 deletions

View File

@ -1341,6 +1341,19 @@ void D_SRB2Main(void)
ultimatemode = true;
}
// rei/miru: bootmap (Idea: starts the game on a predefined map)
if (bootmap && !(M_CheckParm("-warp") && M_IsNextParm()))
{
pstartmap = bootmap;
if (pstartmap < 1 || pstartmap > NUMMAPS)
I_Error("Cannot warp to map %d (out of range)\n", pstartmap);
else
{
autostart = true;
}
}
if (autostart || netgame || M_CheckParm("+connect") || M_CheckParm("-connect"))
{
gameaction = ga_nothing;

View File

@ -3241,6 +3241,20 @@ static void readmaincfg(MYFILE *f)
DEH_WriteUndoline(word, customversionstring, UNDO_NONE);
strlcpy(customversionstring, word2, sizeof (customversionstring));
}
else if (fastcmp(word, "BOOTMAP"))
{
// Support using the actual map name,
// i.e., Level AB, Level FZ, etc.
// Convert to map number
if (word2[0] >= 'A' && word2[0] <= 'Z')
value = M_MapNumber(word2[0], word2[1]);
else
value = get_number(word2);
DEH_WriteUndoline(word, va("%d", bootmap), UNDO_NONE);
bootmap = (INT16)value;
}
else
deh_warning("Maincfg: unknown word '%s'", word);
}