From b1d04d57377c6a2e7e6cd2ea2612cb6d86c739e1 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 13 Jan 2010 20:04:52 +1300 Subject: [PATCH] fix MGG and MRJ --- OpenRa.Game/Traits/Util.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/Traits/Util.cs b/OpenRa.Game/Traits/Util.cs index 3e9018f05b..4ac78ecf7a 100755 --- a/OpenRa.Game/Traits/Util.cs +++ b/OpenRa.Game/Traits/Util.cs @@ -82,7 +82,8 @@ namespace OpenRa.Game.Traits static float2 GetRecoil(Actor self, float recoil) { - if (self.Info.Traits.Get().Recoil == 0) return float2.Zero; + var abInfo = self.Info.Traits.GetOrDefault(); + if (abInfo == null || abInfo.Recoil == 0) return float2.Zero; var rut = self.traits.GetOrDefault(); if (rut == null) return float2.Zero;