- 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 19:04:35 +01:00 committed by drfrag
parent 1b67418a1f
commit 164a9640b9

View file

@ -468,7 +468,9 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
FileReader reader;
if (!FileExists (musicname))
{
if ((lumpnum = Wads.CheckNumForFullName (musicname, true, ns_music)) == -1)
lumpnum = Wads.CheckNumForFullName (musicname);
if (lumpnum == -1) lumpnum = Wads.CheckNumForName (musicname, ns_music);
if (lumpnum == -1)
{
Printf ("Music \"%s\" not found\n", musicname);
return false;