- Fixed: When r3837 moved SNDINFO parsing before MAPINFO parsing, it broke support for Hexen's $map SNDINFO command. Removed LEVEL2_MUSICDEFINED, since it's no longer needed by the new implementation for this command.

SVN r3856 (trunk)
This commit is contained in:
Randy Heit 2012-08-28 03:21:13 +00:00
commit 40cefe6107
3 changed files with 19 additions and 12 deletions

View file

@ -220,6 +220,7 @@ extern int sfx_empty;
// PUBLIC DATA DEFINITIONS -------------------------------------------------
TArray<sfxinfo_t> S_sfx (128);
TMap<int, FString> HexenMusic;
// PRIVATE DATA DEFINITIONS ------------------------------------------------
@ -886,6 +887,7 @@ static void S_ClearSoundData()
DefPlayerClassName = "";
MusicAliases.Clear();
MidiDevices.Clear();
HexenMusic.Clear();
}
//==========================================================================
@ -1084,16 +1086,14 @@ static void S_AddSNDINFO (int lump)
case SI_Map: {
// Hexen-style $MAP command
level_info_t *info;
char temp[16];
int mapnum;
sc.MustGetNumber ();
mysnprintf (temp, countof(temp), "MAP%02d", sc.Number);
info = FindLevelInfo (temp);
sc.MustGetString ();
if (info->mapname[0] && (!(info->flags2 & LEVEL2_MUSICDEFINED)))
sc.MustGetNumber();
mapnum = sc.Number;
sc.MustGetString();
if (mapnum != 0)
{
info->Music = sc.String;
HexenMusic[mapnum] = sc.String;
}
}
break;