- fixed: extended sound lookup must check the sound/ folder.

This commit is contained in:
Christoph Oelckers 2021-04-08 16:05:32 +02:00
parent 1439897b65
commit e2f570a70a

View file

@ -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);