From 6f4dfd9a61b3480b1bb79ccc8c47be4d69c395c6 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 11 Dec 2020 11:39:24 +0100 Subject: [PATCH] - added the option to look for music by using a truncated 8-character variant of the given name. This workaround is needed because there's known old mods depending on this legacy behavior. --- src/sound/s_doomsound.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sound/s_doomsound.cpp b/src/sound/s_doomsound.cpp index 40448275b..c8cbd4bb8 100644 --- a/src/sound/s_doomsound.cpp +++ b/src/sound/s_doomsound.cpp @@ -192,7 +192,9 @@ static FileReader OpenMusic(const char* musicname) if (!FileExists(musicname)) { int lumpnum; - if ((lumpnum = fileSystem.CheckNumForFullName(musicname, true, ns_music)) == -1) + lumpnum = fileSystem.CheckNumForFullName(musicname); + if (lumpnum == -1) lumpnum = fileSystem.CheckNumForName(musicname, ns_music); + if (lumpnum == -1) { Printf("Music \"%s\" not found\n", musicname); }