Fix map StartingMusic overriding BackgroundMusic.
This commit is contained in:
@@ -66,9 +66,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
random = playlist.Shuffle(Game.CosmeticRandom).ToArray();
|
||||
IsMusicAvailable = playlist.Any();
|
||||
|
||||
if (SongExists(info.StartingMusic))
|
||||
currentSong = world.Map.Rules.Music[info.StartingMusic];
|
||||
else if (SongExists(info.BackgroundMusic))
|
||||
if (SongExists(info.BackgroundMusic))
|
||||
{
|
||||
currentSong = currentBackgroundSong = world.Map.Rules.Music[info.BackgroundMusic];
|
||||
CurrentSongIsBackground = true;
|
||||
@@ -81,6 +79,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
currentSong = random.FirstOrDefault();
|
||||
}
|
||||
|
||||
if (SongExists(info.StartingMusic))
|
||||
{
|
||||
currentSong = world.Map.Rules.Music[info.StartingMusic];
|
||||
CurrentSongIsBackground = false;
|
||||
}
|
||||
|
||||
Play();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user