remove auto/postload check variables
we can just check our counts since D_FindAddonsToAutoload will never be called again
This commit is contained in:
1 parent
7c1f17bb8d
commit
3e0150d4f3
1 file changed
+5
-7
+5
-7
@@ -106,8 +106,6 @@ static char *autoloadwadfiles[MAX_WADFILES];
|
||||
static char *autoloadwadfilespost[MAX_WADFILES];
|
||||
static size_t autoloadcount = 0;
|
||||
static size_t postloadcount = 0;
|
||||
static boolean autoloaded = false;
|
||||
static boolean postautoloaded = false;
|
||||
//
|
||||
|
||||
boolean devparm = false; // started game with -devparm
|
||||
@@ -1160,7 +1158,7 @@ static void D_FindAddonsToAutoload(void)
|
||||
// If the file is found, run our shit
|
||||
if (!autoloadconfigfile) // nope outta here
|
||||
{
|
||||
autoloaded = postautoloaded = true; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
|
||||
autoloadcount = postloadcount = 0; // so D_AddAutoloadFiles can skip everything since nothings there to autoload
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1214,7 +1212,8 @@ static void D_FindAddonsToAutoload(void)
|
||||
|
||||
static void D_AddAutoloadFiles(void)
|
||||
{
|
||||
if (autoloaded)
|
||||
// nothing to autoload
|
||||
if (autoloadcount == 0)
|
||||
return;
|
||||
|
||||
CONS_Printf("D_AutoloadFile(): Loading autoloaded addons...\n");
|
||||
@@ -1225,12 +1224,12 @@ static void D_AddAutoloadFiles(void)
|
||||
D_CleanFile(autoloadwadfiles, autoloadcount);
|
||||
|
||||
autoloadcount = 0;
|
||||
autoloaded = true;
|
||||
}
|
||||
|
||||
void D_AddPostloadFiles(void)
|
||||
{
|
||||
if (postautoloaded || !netgame)
|
||||
// nothing to postload
|
||||
if (postloadcount == 0 || !netgame)
|
||||
return;
|
||||
|
||||
CONS_Printf("D_AddPostloadFiles(): Loading postloaded addons...\n");
|
||||
@@ -1241,7 +1240,6 @@ void D_AddPostloadFiles(void)
|
||||
D_CleanFile(autoloadwadfilespost, postloadcount);
|
||||
|
||||
postloadcount = 0;
|
||||
postautoloaded = true;
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
Reference in new issue
Block a user