Replace MapGrid.CellCorners with a new CellRamp struct.

This commit is contained in:
Paul Chote
2020-04-28 00:52:40 +01:00
committed by atlimit8
parent 4614f6febe
commit 5af12440ba
3 changed files with 126 additions and 73 deletions

View File

@@ -263,7 +263,7 @@ namespace OpenRA.Graphics
if (Math.Abs(s.X - world.X) <= tileSize.Width && Math.Abs(s.Y - world.Y) <= tileSize.Height)
{
var ramp = map.Ramp.Contains(uv) ? map.Ramp[uv] : 0;
var corners = map.Grid.CellCorners[ramp];
var corners = map.Grid.Ramps[ramp].Corners;
var pos = map.CenterOfCell(uv.ToCPos(map));
var screen = corners.Select(c => worldRenderer.ScreenPxPosition(pos + c)).ToArray();