Add support for E0LXY to game defs music token

git-svn-id: https://svn.eduke32.com/eduke32@7687 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-05-27 22:30:42 +00:00 committed by Christoph Oelckers
parent ecf990253b
commit 5fc9868c6a

View file

@ -543,7 +543,13 @@ static inline int G_GetMusicIdx(const char *str)
if (numMatches != 4 || Btoupper(b1) != 'E' || Btoupper(b2) != 'L')
return -1;
if ((unsigned)--lev >= MAXLEVELS || (unsigned)--ep >= MAXVOLUMES)
if ((unsigned)--lev >= MAXLEVELS)
return -2;
if (ep == 0)
return (MAXVOLUMES * MAXLEVELS) + lev;
if ((unsigned)--ep >= MAXVOLUMES)
return -2;
return (ep * MAXLEVELS) + lev;