From e2f570a70afcf6e8cff983ca0e94aa2fba0630d5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 8 Apr 2021 16:05:32 +0200 Subject: [PATCH] - fixed: extended sound lookup must check the sound/ folder. --- source/core/raze_sound.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/core/raze_sound.cpp b/source/core/raze_sound.cpp index 4020f1b0a..463fece92 100644 --- a/source/core/raze_sound.cpp +++ b/source/core/raze_sound.cpp @@ -142,7 +142,11 @@ int S_LookupSound(const char* fn) static const char * const sndformats[] = { "OGG", "FLAC", "WAV" }; if (snd_extendedlookup) { - int lump = fileSystem.FindFileWithExtensions(StripExtension(fn), sndformats, countof(sndformats)); + auto newfn = StripExtension(fn); + int lump = fileSystem.FindFileWithExtensions(newfn, sndformats, countof(sndformats)); + if (lump >= 0) return lump; + newfn = "sound/" + newfn; + lump = fileSystem.FindFileWithExtensions(newfn, sndformats, countof(sndformats)); if (lump >= 0) return lump; } return fileSystem.FindFile(fn);