Fix barrel recoil being set immediately, not when actually firing

This commit is contained in:
teees
2016-04-15 14:06:21 +02:00
parent 0538f0c66e
commit 3c4d9b4c84

View File

@@ -233,14 +233,14 @@ namespace OpenRA.Mods.Common.Traits
if (args.Weapon.Report != null && args.Weapon.Report.Any())
Game.Sound.Play(args.Weapon.Report.Random(self.World.SharedRandom), self.CenterPosition);
foreach (var na in self.TraitsImplementing<INotifyAttack>())
na.Attacking(self, target, this, barrel);
Recoil = Info.Recoil;
}
});
foreach (var na in self.TraitsImplementing<INotifyAttack>())
na.Attacking(self, target, this, barrel);
Recoil = Info.Recoil;
if (--Burst > 0)
FireDelay = Weapon.BurstDelay;
else