diff --git a/OpenRA.Mods.Common/Traits/Armament.cs b/OpenRA.Mods.Common/Traits/Armament.cs index b4c2e471ad..415ee9fc78 100644 --- a/OpenRA.Mods.Common/Traits/Armament.cs +++ b/OpenRA.Mods.Common/Traits/Armament.cs @@ -107,6 +107,7 @@ namespace OpenRA.Mods.Common.Traits Turreted turret; AmmoPool ammoPool; BodyOrientation coords; + INotifyBurstComplete[] notifyBurstComplete; IEnumerable rangeModifiers; List> delayedActions = new List>(); @@ -149,6 +150,7 @@ namespace OpenRA.Mods.Common.Traits turret = self.TraitsImplementing().FirstOrDefault(t => t.Name == Info.Turret); ammoPool = self.TraitsImplementing().FirstOrDefault(la => la.Info.Name == Info.AmmoPoolName); coords = self.Trait(); + notifyBurstComplete = self.TraitsImplementing().ToArray(); rangeModifiers = self.TraitsImplementing().ToArray().Select(m => m.GetRangeModifier()); base.Created(self); @@ -281,7 +283,7 @@ namespace OpenRA.Mods.Common.Traits }); } - foreach (var nbc in self.TraitsImplementing()) + foreach (var nbc in notifyBurstComplete) nbc.FiredBurst(self, target, this); }