Remove lazy loading of binary map data.

This commit is contained in:
Paul Chote
2016-03-12 21:23:32 +00:00
parent 51bfe4accc
commit 65df25b1a4
22 changed files with 141 additions and 183 deletions

View File

@@ -88,7 +88,7 @@ namespace OpenRA.Mods.Common.Widgets
foreach (var cell in world.Map.AllCells)
UpdateTerrainCell(cell);
world.Map.MapTiles.Value.CellEntryChanged += UpdateTerrainCell;
world.Map.Tiles.CellEntryChanged += UpdateTerrainCell;
world.Map.CustomTerrain.CellEntryChanged += UpdateTerrainCell;
}
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Common.Widgets
int leftColor, rightColor;
if (custom == byte.MaxValue)
{
var type = world.Map.Rules.TileSet.GetTileInfo(world.Map.MapTiles.Value[uv]);
var type = world.Map.Rules.TileSet.GetTileInfo(world.Map.Tiles[uv]);
leftColor = type != null ? type.LeftColor.ToArgb() : Color.Black.ToArgb();
rightColor = type != null ? type.RightColor.ToArgb() : Color.Black.ToArgb();
}
@@ -444,7 +444,7 @@ namespace OpenRA.Mods.Common.Widgets
public override void Removed()
{
base.Removed();
world.Map.MapTiles.Value.CellEntryChanged -= UpdateTerrainCell;
world.Map.Tiles.CellEntryChanged -= UpdateTerrainCell;
world.Map.CustomTerrain.CellEntryChanged -= UpdateTerrainCell;
Dispose();
}