Reference SubCells directly from MapGrid.

This commit is contained in:
Paul Chote
2016-03-12 21:01:55 +00:00
parent c9e7bb43c2
commit e79fbe1bb9
8 changed files with 33 additions and 38 deletions

View File

@@ -89,7 +89,7 @@ namespace OpenRA.Mods.Common.Traits
var targetCell = world.Map.CellContaining(target);
// Correct for SubCell offset
target -= world.Map.OffsetOfSubCell(srcSub);
target -= world.Map.Grid.OffsetOfSubCell(srcSub);
// Select only the tiles that are within range from the requested SubCell
// This assumes that the SubCell does not change during the path traversal