Move TileScale to MapGrid

This commit is contained in:
Gustas
2023-04-25 19:30:48 +03:00
committed by Pavel Penev
parent 8f511a3bb6
commit 44f1af7059
7 changed files with 14 additions and 14 deletions

View File

@@ -68,11 +68,11 @@ namespace OpenRA.Mods.Common.Traits
map = world.Map;
globalTint = new float3(info.RedTint, info.GreenTint, info.BlueTint);
var cellSize = map.Grid.Type == MapGridType.RectangularIsometric ? 1448 : 1024;
var tileScale = map.Grid.TileScale;
partitionedLightSources = new SpatiallyPartitioned<LightSource>(
(map.MapSize.X + 1) * cellSize,
(map.MapSize.Y + 1) * cellSize,
info.BinSize * cellSize);
(map.MapSize.X + 1) * tileScale,
(map.MapSize.Y + 1) * tileScale,
info.BinSize * tileScale);
}
Rectangle Bounds(LightSource source)