mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-03-20 18:02:17 +00:00
Move modified check on -file addons later in startup
This commit is contained in:
parent
fae8833ff4
commit
66c9d9aa83
3 changed files with 7 additions and 8 deletions
|
@ -1164,11 +1164,7 @@ void D_SRB2Main(void)
|
|||
const char *s = M_GetNextParm();
|
||||
|
||||
if (s) // Check for NULL?
|
||||
{
|
||||
if (!W_VerifyNMUSlumps(s))
|
||||
G_SetGameModified(true, false);
|
||||
D_AddFile(s, startuppwads);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1218,7 +1214,7 @@ void D_SRB2Main(void)
|
|||
|
||||
// load wad, including the main wad file
|
||||
CONS_Printf("W_InitMultipleFiles(): Adding IWAD and main PWADs.\n");
|
||||
if (!W_InitMultipleFiles(startupwadfiles))
|
||||
if (!W_InitMultipleFiles(startupwadfiles, false))
|
||||
#ifdef _DEBUG
|
||||
CONS_Error("A WAD file was not found or not valid.\nCheck the log to see which ones.\n");
|
||||
#else
|
||||
|
@ -1284,7 +1280,7 @@ void D_SRB2Main(void)
|
|||
}
|
||||
}
|
||||
|
||||
if (!W_InitMultipleFiles(startuppwads))
|
||||
if (!W_InitMultipleFiles(startuppwads, true))
|
||||
CONS_Error("A PWAD file was not found or not valid.\nCheck the log to see which ones.\n");
|
||||
D_CleanFile(startuppwads);
|
||||
|
||||
|
|
|
@ -855,13 +855,16 @@ void W_UnloadWadFile(UINT16 num)
|
|||
* \return 1 if all files were loaded, 0 if at least one was missing or
|
||||
* invalid.
|
||||
*/
|
||||
INT32 W_InitMultipleFiles(char **filenames)
|
||||
INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||
{
|
||||
INT32 rc = 1;
|
||||
|
||||
// will be realloced as lumps are added
|
||||
for (; *filenames; filenames++)
|
||||
{
|
||||
if (addons && !W_VerifyNMUSlumps(*filenames))
|
||||
G_SetGameModified(true, false);
|
||||
|
||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
||||
rc &= (W_InitFile(*filenames) != INT16_MAX) ? 1 : 0;
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ void W_UnloadWadFile(UINT16 num);
|
|||
|
||||
// W_InitMultipleFiles returns 1 if all is okay, 0 otherwise,
|
||||
// so that it stops with a message if a file was not found, but not if all is okay.
|
||||
INT32 W_InitMultipleFiles(char **filenames);
|
||||
INT32 W_InitMultipleFiles(char **filenames, boolean addons);
|
||||
|
||||
const char *W_CheckNameForNumPwad(UINT16 wad, UINT16 lump);
|
||||
const char *W_CheckNameForNum(lumpnum_t lumpnum);
|
||||
|
|
Loading…
Reference in a new issue