From 12a02cb456c05080e84a4ee4b2cc884b5ea4bfcf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 3 Nov 2019 15:54:18 +0100 Subject: [PATCH] - fixed: lump filters without any dot in the name did not work. --- source/common/filesystem/resourcefile.cpp | 6 +++++- source/rr/src/osdcmds.cpp | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/source/common/filesystem/resourcefile.cpp b/source/common/filesystem/resourcefile.cpp index 1a99afb62..833b72e94 100644 --- a/source/common/filesystem/resourcefile.cpp +++ b/source/common/filesystem/resourcefile.cpp @@ -303,7 +303,11 @@ void FResourceFile::PostProcessArchive(void *lumps, size_t lumpsize) int lastpos = -1; FString file; - while ((len = LumpFilter.IndexOf('.', lastpos+1)) > 0) + if (LumpFilter.IndexOf('.') < 0) + { + max -= FilterLumps(LumpFilter, lumps, lumpsize, max); + } + else while ((len = LumpFilter.IndexOf('.', lastpos+1)) > 0) { max -= FilterLumps(LumpFilter.Left(len), lumps, lumpsize, max); lastpos = len; diff --git a/source/rr/src/osdcmds.cpp b/source/rr/src/osdcmds.cpp index 8f368f21b..d610b9749 100644 --- a/source/rr/src/osdcmds.cpp +++ b/source/rr/src/osdcmds.cpp @@ -915,8 +915,11 @@ static int osdcmd_printtimes(osdcmdptr_t UNUSED(parm)) int32_t registerosdcommands(void) { - if (!VOLUMEONE) + if (VOLUMEONE) + OSD_RegisterFunction("changelevel","changelevel : warps to the given level", osdcmd_changelevel); + else { + OSD_RegisterFunction("changelevel","changelevel : warps to the given level", osdcmd_changelevel); OSD_RegisterFunction("map","map : loads the given user map", osdcmd_map); OSD_RegisterFunction("demo","demo : starts the given demo", osdcmd_demo); }