diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 575b753d6e..dbd9d1a7d9 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -39,9 +39,12 @@ namespace OpenRA.GameRules [Desc("The maximum range the weapon can fire.")] public readonly WDist Range = WDist.Zero; - [Desc("The sound played when the weapon is fired.")] + [Desc("The sound played each time the weapon is fired.")] public readonly string[] Report = null; + [Desc("Sound played only on first burst in a salvo.")] + public readonly string[] StartBurstReport = null; + [Desc("The sound played when the weapon is reloaded.")] public readonly string[] AfterFireSound = null; diff --git a/OpenRA.Mods.Common/Traits/Armament.cs b/OpenRA.Mods.Common/Traits/Armament.cs index 373fc03d83..0cee48ad07 100644 --- a/OpenRA.Mods.Common/Traits/Armament.cs +++ b/OpenRA.Mods.Common/Traits/Armament.cs @@ -247,6 +247,9 @@ namespace OpenRA.Mods.Common.Traits if (args.Weapon.Report != null && args.Weapon.Report.Any()) Game.Sound.Play(SoundType.World, args.Weapon.Report.Random(self.World.SharedRandom), self.CenterPosition); + if (Burst == args.Weapon.Burst && args.Weapon.StartBurstReport != null && args.Weapon.StartBurstReport.Any()) + Game.Sound.Play(SoundType.World, args.Weapon.StartBurstReport.Random(self.World.SharedRandom), self.CenterPosition); + foreach (var na in self.TraitsImplementing()) na.Attacking(self, target, this, barrel);