bogus fix for localskins not properly saving when returning back into the titlescreen
This commit is contained in:
1 parent
b6b3dcb3f0
commit
e679dfe0aa
3 files changed
+18
-8
No files matched your search
+8
-1
@@ -3418,6 +3418,13 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* testing purposes
|
||||
CONS_Printf(M_GetText("Local skin number is %d\n"), players[consoleplayer].localskin);
|
||||
for (i = 0; i < numlocalskins; i++) {
|
||||
CONS_Printf(M_GetText("Local skin number is %s\n"), localskins[players[consoleplayer].localskin - 1].name);
|
||||
}
|
||||
*/
|
||||
|
||||
G_AddMapToBuffer(gamemap-1);
|
||||
|
||||
return true;
|
||||
@@ -3472,7 +3479,7 @@ UINT16 P_PartialAddWadFile(const char *wadfilename, boolean local)
|
||||
boolean mapsadded = false;
|
||||
lumpinfo_t *lumpinfo;
|
||||
|
||||
if ((numlumps = W_InitFile(wadfilename)) == INT16_MAX)
|
||||
if ((numlumps = W_InitFile(wadfilename, 0, &wadnum, local)) == INT16_MAX)
|
||||
{
|
||||
refreshdirmenu |= REFRESHDIR_NOTLOADED;
|
||||
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), wadfilename);
|
||||
|
||||
+9
-6
@@ -690,7 +690,7 @@ static void W_ReadFileShaders(wadfile_t *wadfile)
|
||||
//
|
||||
// Can now load dehacked files (.soc)
|
||||
//
|
||||
UINT16 W_InitFile(const char *filename)
|
||||
UINT16 W_InitFile(const char *filename, const char *lumpname, UINT16 *wadnump, boolean local)
|
||||
{
|
||||
FILE *handle;
|
||||
lumpinfo_t *lumpinfo = NULL;
|
||||
@@ -743,10 +743,13 @@ UINT16 W_InitFile(const char *filename)
|
||||
{
|
||||
if (!memcmp(wadfiles[i]->md5sum, md5sum, 16))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), filename);
|
||||
if (handle)
|
||||
fclose(handle);
|
||||
return INT16_MAX;
|
||||
if (!local) {
|
||||
CONS_Alert(CONS_ERROR, M_GetText("%s is already loaded\n"), filename);
|
||||
if (handle)
|
||||
fclose(handle);
|
||||
return INT16_MAX;
|
||||
}
|
||||
CONS_Alert(CONS_WARNING, M_GetText("%s is a local skin that is already loaded\n"), filename);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -898,7 +901,7 @@ INT32 W_InitMultipleFiles(char **filenames, boolean addons)
|
||||
G_SetGameModified(true, false);
|
||||
|
||||
//CONS_Debug(DBG_SETUP, "Loading %s\n", *filenames);
|
||||
rc = W_InitFile(*filenames);
|
||||
rc = W_InitFile(*filenames, 0, 0, false);
|
||||
if (rc == INT16_MAX)
|
||||
CONS_Printf(M_GetText("Errors occurred while loading %s; not added.\n"), *filenames);
|
||||
overallrc &= (rc != INT16_MAX) ? 1 : 0;
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ void W_Shutdown(void);
|
||||
// Opens a WAD file. Returns the FILE * handle for the file, or NULL if not found or could not be opened
|
||||
FILE *W_OpenWadFile(const char **filename, boolean useerrors);
|
||||
// Load and add a wadfile to the active wad files, returns numbers of lumps, INT16_MAX on error
|
||||
UINT16 W_InitFile(const char *filename);
|
||||
UINT16 W_InitFile(const char *filename, const char *lumpname, UINT16 *wadnump, boolean local);
|
||||
#ifdef DELFILE
|
||||
void W_UnloadWadFile(UINT16 num);
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user