Replace CPos.CenterPosition -> Map.CenterOfCell.

This commit is contained in:
Paul Chote
2013-09-17 22:27:19 +12:00
parent b6d1d26eeb
commit 7b52fa52b6
48 changed files with 105 additions and 90 deletions

View File

@@ -94,7 +94,7 @@ namespace OpenRA.Mods.RA.Move
// Select only the tiles that are within range from the requested SubCell
// This assumes that the SubCell does not change during the path traversal
var tilesInRange = world.Map.FindTilesInCircle(targetCell, range.Range / 1024 + 1)
.Where(t => (t.CenterPosition - target).LengthSquared <= rangeSquared
.Where(t => (world.Map.CenterOfCell(t) - target).LengthSquared <= rangeSquared
&& mi.CanEnterCell(self.World, self, t, null, true, true));
// See if there is any cell within range that does not involve a cross-domain request