Add Sound.Play overloads that play a random sound from a list
This commit is contained in:
@@ -43,7 +43,7 @@ namespace OpenRA.Mods.Common.Traits.Sound
|
||||
void PlaySound(Actor self)
|
||||
{
|
||||
if (info.Sounds.Any())
|
||||
Game.Sound.Play(SoundType.World, info.Sounds.Random(self.World.SharedRandom), self.CenterPosition);
|
||||
Game.Sound.Play(SoundType.World, info.Sounds, self.World, self.CenterPosition);
|
||||
}
|
||||
|
||||
void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel)
|
||||
|
||||
Reference in New Issue
Block a user