- 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.
This commit is contained in:
Christoph Oelckers 2020-12-11 11:39:24 +01:00
parent 423fe60080
commit 6f4dfd9a61

View file

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