From 56e929014d206b55ff9b77f5f9a474ad96e09183 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Mon, 26 Jul 2010 21:42:11 +1200 Subject: [PATCH] slightly faster again (map.IsInMap isnt free) -- but be careful --- OpenRA.Game/Traits/Mobile.cs | 1 - OpenRA.Game/Traits/World/UnitInfluence.cs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/Mobile.cs b/OpenRA.Game/Traits/Mobile.cs index 18197f8564..38a26d7ba1 100644 --- a/OpenRA.Game/Traits/Mobile.cs +++ b/OpenRA.Game/Traits/Mobile.cs @@ -174,7 +174,6 @@ namespace OpenRA.Traits if (MovementCostForCell(self, cell) == float.PositiveInfinity) return false; - // Check for buildings var building = bim.GetBuildingBlocking(cell); if (building != null && building != ignoreActor) diff --git a/OpenRA.Game/Traits/World/UnitInfluence.cs b/OpenRA.Game/Traits/World/UnitInfluence.cs index 66a5c4fc67..cf55ddf6f8 100644 --- a/OpenRA.Game/Traits/World/UnitInfluence.cs +++ b/OpenRA.Game/Traits/World/UnitInfluence.cs @@ -67,7 +67,7 @@ namespace OpenRA.Traits public bool AnyUnitsAt(int2 a) { - return map.IsInMap(a) && influence[a.X, a.Y].Count > 0; + return /*map.IsInMap(a) && */influence[a.X, a.Y].Count > 0; } public void Add( Actor self, IOccupySpace unit )