From 3a99bfd06f9375656bcd80bd556bdcb3af94298e Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 27 Jan 2010 11:50:11 +1300 Subject: [PATCH] fix dumbness in crushable support --- OpenRa.Game/WorldUtils.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRa.Game/WorldUtils.cs b/OpenRa.Game/WorldUtils.cs index 36f18f485b..c4aca9bcf4 100755 --- a/OpenRa.Game/WorldUtils.cs +++ b/OpenRa.Game/WorldUtils.cs @@ -27,7 +27,8 @@ namespace OpenRa public static bool IsActorCrushableByActor(this World world, Actor a, Actor b) { - return world.IsActorCrushableByMovementType(a, b.traits.GetOrDefault().GetMovementType()); + var movement = b.traits.GetOrDefault(); + return movement != null && world.IsActorCrushableByMovementType(a, movement.GetMovementType()); } public static bool IsActorPathableToCrush(this World world, Actor a, UnitMovementType umt)