Update for grid API changes (#8152)
This commit is contained in:
@@ -138,8 +138,8 @@ namespace Content.MapRenderer.Painters
|
||||
|
||||
private (float x, float y) TransformLocalPosition(Vector2 position, IMapGrid grid)
|
||||
{
|
||||
var xOffset = (int) Math.Abs(grid.LocalBounds.Left);
|
||||
var yOffset = (int) Math.Abs(grid.LocalBounds.Bottom);
|
||||
var xOffset = (int) Math.Abs(grid.LocalAABB.Left);
|
||||
var yOffset = (int) Math.Abs(grid.LocalAABB.Bottom);
|
||||
var tileSize = grid.TileSize;
|
||||
|
||||
var x = ((float) Math.Floor(position.X) + xOffset) * tileSize * TilePainter.TileImageSize;
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace Content.MapRenderer.Painters
|
||||
var tileXSize = grid.TileSize * TilePainter.TileImageSize;
|
||||
var tileYSize = grid.TileSize * TilePainter.TileImageSize;
|
||||
|
||||
var bounds = grid.LocalBounds;
|
||||
var bounds = grid.LocalAABB;
|
||||
|
||||
var left = bounds.Left;
|
||||
var right = bounds.Right;
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Content.MapRenderer.Painters
|
||||
var stopwatch = new Stopwatch();
|
||||
stopwatch.Start();
|
||||
|
||||
var bounds = grid.LocalBounds;
|
||||
var bounds = grid.LocalAABB;
|
||||
var xOffset = Math.Abs(bounds.Left);
|
||||
var yOffset = Math.Abs(bounds.Bottom);
|
||||
var tileSize = grid.TileSize * TileImageSize;
|
||||
|
||||
Reference in New Issue
Block a user