Add StartBurstReport to WeaponInfo
The FS Juggernaut firing sound already contains 3 shots, so without this, players would hear a total of 9(!) shots per salvo.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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<INotifyAttack>())
|
||||
na.Attacking(self, target, this, barrel);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user