Force postload for autoloaded character addons
This commit is contained in:
1 parent
a064a9e88e
commit
b78d3bb0a8
1 file changed
+32
-1
+32
-1
@@ -968,7 +968,8 @@ static void D_FindAddonsToAutoload(void)
|
||||
const char *autoloadpath;
|
||||
boolean postload;
|
||||
|
||||
INT32 i;
|
||||
INT32 i, len;
|
||||
boolean hasprefix = false;
|
||||
char wadsToAutoload[256] = "", renameAutoloadStrings[256] = "";
|
||||
|
||||
// does it exist tho
|
||||
@@ -999,6 +1000,36 @@ static void D_FindAddonsToAutoload(void)
|
||||
wadsToAutoload[i] = '\0';
|
||||
}
|
||||
|
||||
len = strlen(wadsToAutoload);
|
||||
hasprefix = false;
|
||||
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
if (wadsToAutoload[i] == '_')
|
||||
{
|
||||
hasprefix = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Lets just hope no one adds bonuschars in autoload
|
||||
if (hasprefix)
|
||||
{
|
||||
// We searching for c in prefix, which stands for "character" and doesn't work well with
|
||||
// autoload atm, only fine for postload
|
||||
for (i = 0; i < len; ++i)
|
||||
{
|
||||
if (wadsToAutoload[i] == '_') break; // Prefix end
|
||||
|
||||
if (wadsToAutoload[i] == 'c' || wadsToAutoload[i] == 'C')
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, "forcing postload for %s as local skin\n", wadsToAutoload);
|
||||
postload = true;
|
||||
break; // Found it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LOAD IT
|
||||
if (!postload)
|
||||
D_AutoloadFile(wadsToAutoload, autoloadwadfiles);
|
||||
|
||||
Reference in new issue
Block a user