Refactor MobileInfo.CanEnterCell

This commit is contained in:
atlimit8
2014-07-30 05:41:14 -05:00
parent fe57417aa8
commit 9efcf231e1
6 changed files with 30 additions and 11 deletions

View File

@@ -95,7 +95,7 @@ namespace OpenRA.Mods.RA.Move
// This assumes that the SubCell does not change during the path traversal
var tilesInRange = world.Map.FindTilesInCircle(targetCell, range.Range / 1024 + 1)
.Where(t => (world.Map.CenterOfCell(t) - target).LengthSquared <= rangeSquared
&& mi.CanEnterCell(self.World, self, t, null, true, true));
&& mi.CanEnterCell(self.World, self, t));
// See if there is any cell within range that does not involve a cross-domain request
// Really, we only need to check the circle perimeter, but it's not clear that would be a performance win