- 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:
parent
3a6806942c
commit
40cefe6107
3 changed files with 19 additions and 12 deletions
|
|
@ -61,6 +61,8 @@ static cluster_info_t TheDefaultClusterInfo;
|
|||
|
||||
TArray<FEpisode> AllEpisodes;
|
||||
|
||||
extern TMap<int, FString> HexenMusic;
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
@ -918,8 +920,6 @@ DEFINE_MAP_OPTION(music, true)
|
|||
{
|
||||
parse.ParseAssign();
|
||||
parse.ParseMusic(info->Music, info->musicorder);
|
||||
// Flag the level so that the $MAP command doesn't override this.
|
||||
info->flags2 |= LEVEL2_MUSICDEFINED;
|
||||
}
|
||||
|
||||
DEFINE_MAP_OPTION(intermusic, true)
|
||||
|
|
@ -1538,6 +1538,14 @@ level_info_t *FMapInfoParser::ParseMapHeader(level_info_t &defaultinfo)
|
|||
// to teleport to maps with standard names without needing a levelnum.
|
||||
levelinfo->levelnum = GetDefaultLevelNum(levelinfo->mapname);
|
||||
|
||||
// Does this map have a song defined via SNDINFO's $map command?
|
||||
// Set that as this map's default music if it does.
|
||||
FString *song;
|
||||
if ((song = HexenMusic.CheckKey(levelinfo->levelnum)) != NULL)
|
||||
{
|
||||
levelinfo->Music = *song;
|
||||
}
|
||||
|
||||
return levelinfo;
|
||||
}
|
||||
|
||||
|
|
@ -1832,7 +1840,6 @@ void FMapInfoParser::ParseMapInfo (int lump, level_info_t &gamedefaults, level_i
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue