From 7fe42d7493eccb53ac8bf8136c082f542dd91d8e Mon Sep 17 00:00:00 2001 From: RoosterDragon Date: Sat, 6 Feb 2016 22:18:30 +0000 Subject: [PATCH] Fix mobility checks when we aren't checking a realized actor. --- OpenRA.Mods.Common/Traits/Mobile.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index d555e29eb7..46df88d34c 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -232,6 +232,12 @@ namespace OpenRA.Mods.Common.Traits if (otherActor == ignoreActor) return false; + // If self is null, we don't have a real actor - we're just checking what would happen theoretically. + // In such a scenario - we'll just assume any other actor in the cell will block us by default. + // If we have a real actor, we can then perform the extra checks that allow us to avoid being blocked. + if (self == null) + return true; + // If the check allows: we are not blocked by allied units moving in our direction. if (!check.HasCellCondition(CellConditions.BlockedByMovers) && self.Owner.Stances[otherActor.Owner] == Stance.Ally &&