From d5d6812e0789fe1cc548d39412b673b987d23f4e Mon Sep 17 00:00:00 2001 From: Bob Date: Tue, 12 Jan 2010 20:06:49 +1300 Subject: [PATCH] fixed Recoil. --- OpenRa.Game/Traits/Util.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRa.Game/Traits/Util.cs b/OpenRa.Game/Traits/Util.cs index 246a19721b..bde7f77c59 100755 --- a/OpenRa.Game/Traits/Util.cs +++ b/OpenRa.Game/Traits/Util.cs @@ -82,14 +82,14 @@ namespace OpenRa.Game.Traits static float2 GetRecoil(Actor self, float recoil) { - if (self.LegacyInfo.Recoil == 0) return float2.Zero; + if (self.Info.Traits.Get().Recoil == 0) return float2.Zero; var rut = self.traits.GetOrDefault(); if (rut == null) return float2.Zero; var facing = self.traits.Get().turretFacing; var quantizedFacing = QuantizeFacing(facing, rut.anim.CurrentSequence.Length) * (256 / rut.anim.CurrentSequence.Length); - return RotateVectorByFacing(new float2(0, recoil * self.LegacyInfo.Recoil), quantizedFacing, .7f); + return RotateVectorByFacing(new float2(0, recoil * self.Info.Traits.Get().Recoil), quantizedFacing, .7f); } public static float2 CenterOfCell(int2 loc)