Add Sound.Play overloads that play a random sound from a list
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
void INotifyCashTransfer.OnAcceptingCash(Actor self, Actor donor)
|
||||
{
|
||||
if (info.Sounds.Length > 0)
|
||||
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 INotifyCashTransfer.OnDeliveringCash(Actor self, Actor acceptor) { }
|
||||
|
||||
Reference in New Issue
Block a user