Remove World.TileSet.

This commit is contained in:
Paul Chote
2016-02-18 18:54:30 +00:00
parent 7993068c8f
commit 602acabe47
34 changed files with 59 additions and 65 deletions

View File

@@ -136,7 +136,7 @@ namespace OpenRA.Mods.Common.Traits
// PERF: This struct allows us to cache the terrain info for the tileset used by the world.
// This allows us to speed up some performance-sensitive pathfinding calculations.
World = world;
TerrainInfos = info.TilesetTerrainInfo[world.TileSet];
TerrainInfos = info.TilesetTerrainInfo[world.Map.Rules.TileSet];
}
}
@@ -151,7 +151,7 @@ namespace OpenRA.Mods.Common.Traits
public int MovementCostForCell(World world, CPos cell)
{
return MovementCostForCell(world.Map, TilesetTerrainInfo[world.TileSet], cell);
return MovementCostForCell(world.Map, TilesetTerrainInfo[world.Map.Rules.TileSet], cell);
}
int MovementCostForCell(Map map, TerrainInfo[] terrainInfos, CPos cell)
@@ -630,7 +630,7 @@ namespace OpenRA.Mods.Common.Traits
if (index == byte.MaxValue)
return 0;
var terrainSpeed = Info.TilesetTerrainInfo[self.World.TileSet][index].Speed;
var terrainSpeed = Info.TilesetTerrainInfo[self.World.Map.Rules.TileSet][index].Speed;
if (terrainSpeed == 0)
return 0;