Fix mobility checks when we aren't checking a realized actor.

This commit is contained in:
RoosterDragon
2016-02-06 22:18:30 +00:00
parent 870867760a
commit 7fe42d7493

View File

@@ -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 &&