mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-20 18:01:16 +00:00
bootmap
(+indentation fix)
This commit is contained in:
parent
7f83e0d134
commit
13c748531f
2 changed files with 27 additions and 0 deletions
13
src/d_main.c
13
src/d_main.c
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue