Account for ramps in terrain height calculations.

This commit is contained in:
Paul Chote
2020-05-04 00:25:14 +01:00
committed by atlimit8
parent 5af12440ba
commit 626b40f31b
6 changed files with 48 additions and 17 deletions

View File

@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Traits
var height = (int)map.Height[uv];
var r = map.Grid.Ramps[map.Ramp[uv]];
var pos = map.CenterOfCell(uv.ToCPos(map));
var pos = map.CenterOfCell(uv.ToCPos(map)) - new WVec(0, 0, r.CenterHeightOffset);
var width = uv == mouseCell ? 3 : 1;
// Colors change between points, so render separately