Rename MapGridType.Diamond to MapGridType.RectangularIsometric

This commit is contained in:
Pavel Penev
2015-10-01 01:00:29 +03:00
parent 0e417a3cf3
commit b16ebd480b
13 changed files with 38 additions and 40 deletions

View File

@@ -39,9 +39,9 @@ namespace OpenRA
// The bottom edge is trickier: cells at MPos.V > bottomRight.V may have
// been projected into this region if they have height > 0.
// Each height step is equivalent to 512 WRange units, which is one MPos
// step for diamond cells, but only half a MPos step for classic cells. Doh!
// step for isometric cells, but only half a MPos step for classic cells. Doh!
var maxHeight = map.Grid.MaximumTerrainHeight;
var heightOffset = map.Grid.Type == MapGridType.Diamond ? maxHeight : maxHeight / 2;
var heightOffset = map.Grid.Type == MapGridType.RectangularIsometric ? maxHeight : maxHeight / 2;
// Use the MapHeight data array to clamp the bottom coordinate so it doesn't overflow the map
mapBottomRight = map.MapHeight.Value.Clamp(new MPos(bottomRight.U, bottomRight.V + heightOffset));