Fix (hopufully) all remaining edge cases

This commit is contained in:
Gustaf Alhäll 2024-10-13 17:47:56 +02:00
parent 0b2202e5cb
commit 0dac4ed492
3 changed files with 5 additions and 3 deletions

View file

@ -3925,6 +3925,7 @@ void readmaincfg(MYFILE *f)
value = get_number(word2);
bootmap = (INT16)value;
bootmapchanged = true;
//titlechanged = true;
}
else if (fastcmp(word, "STARTCHAR"))

View file

@ -20,6 +20,7 @@ boolean deh_loaded = false;
boolean gamedataadded = false;
boolean titlechanged = false;
boolean introchanged = false;
boolean bootmapchanged = false;
static int dbg_line;
static INT32 deh_num_warning = 0;
@ -196,8 +197,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
deh_num_warning = 0;
bootmap = 0;
gamedataadded = titlechanged = introchanged = false;
gamedataadded = titlechanged = introchanged = bootmapchanged = false;
// it doesn't test the version of SRB2 and version of dehacked file
dbg_line = -1; // start at -1 so the first line is 0.
@ -588,7 +588,7 @@ static void DEH_LoadDehackedFile(MYFILE *f, boolean mainfile)
if (gamestate == GS_TITLESCREEN)
{
if (bootmap)
if (bootmapchanged && bootmap)
{
menuactive = false;
D_MapChange(bootmap, gametype, ultimatemode, true, 0, false, false);

View file

@ -39,6 +39,7 @@ extern boolean deh_loaded;
extern boolean gamedataadded;
extern boolean titlechanged;
extern boolean introchanged;
extern boolean bootmapchanged;
#define MAX_ACTION_RECURSION 30
extern const char *luaactions[MAX_ACTION_RECURSION];