Add Sound.Play overloads that play a random sound from a list
This commit is contained in:
@@ -81,7 +81,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
void INotifyCashTransfer.OnDeliveringCash(Actor self, Actor acceptor)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
public class DeliversCashOrderTargeter : UnitOrderTargeter
|
||||
|
||||
Reference in New Issue
Block a user