removed unused autoload variables

M_ConnectMenuModChecks been checking an uninitialized bool the whole time Zzz...
This commit is contained in:
Alug committed 2025-11-01 18:28:58 +01:00
1 parent 7992888df6
commit b0fe13836b
3 files changed
+6 -10

No files matched your search

+4 -6
View File
@@ -103,10 +103,8 @@ static char *startuppwads[MAX_WADFILES];
// autoloading
static char *autoloadwadfiles[MAX_WADFILES];
static char *autoloadwadfilespost[MAX_WADFILES];
boolean autoloading;
boolean autoloaded;
static boolean autoloaded = false;
boolean postautoloaded = false;
boolean wasautoloaded = false;
//
boolean devparm = false; // started game with -devparm
@@ -1163,7 +1161,7 @@ static void D_FindAddonsToAutoload(void)
// If the file is found, run our shit
if (!autoloadconfigfile) // nope outta here
{
wasautoloaded = postautoloaded = true; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
autoloaded = postautoloaded = true; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
return;
}
@@ -1211,7 +1209,7 @@ static void D_FindAddonsToAutoload(void)
static void D_AddAutoloadFiles(void)
{
if (wasautoloaded)
if (autoloaded)
return;
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
@@ -1219,7 +1217,7 @@ static void D_AddAutoloadFiles(void)
CONS_Printf("D_AutoloadFile(): Are you sure you put in valid files or what?\n");
D_CleanFile(autoloadwadfiles);
wasautoloaded = true;
autoloaded = true;
}
void D_AddPostloadFiles(void)
-2
View File
@@ -61,8 +61,6 @@ extern boolean minilighticon; // mkwii-style minimap headlight
//
// autoload stuff
extern boolean autoloading;
extern boolean autoloaded;
extern boolean postautoloaded;
void D_AddPostloadFiles(void);
+2 -2
View File
@@ -6935,9 +6935,9 @@ static void M_ConnectMenuModChecks(INT32 choice)
(void)choice;
// okay never mind we want to COMMUNICATE to the player pre-emptively instead of letting them try and then get confused when it doesn't work
if (modifiedgame || autoloaded)
if (modifiedgame)
{
M_StartMessage(M_GetText("You have addons loaded.\nYou won't be able to join netgames!\n\nTo play online, restart the game\nand don't load any addons.\nSRB2Kart will automatically add\neverything you need when you join.\n\n(Press a key)\n"),M_ConnectMenu,MM_EVENTHANDLER);
M_StartMessage("You have addons loaded.\nYou won't be able to join netgames!\n\nTo play online, restart the game\nand don't load any addons.\nSRB2Kart will automatically add\neverything you need when you join.\n\n(Press a key)\n", M_ConnectMenu, MM_EVENTHANDLER);
return;
}