Kill ITerrainTypeModifier for explicit updating of a custom layer in the map. Functionally equivalent, but MUCH faster.

This commit is contained in:
Paul Chote
2010-07-22 22:22:53 +12:00
parent 3e493cb93c
commit d21e9fe093
10 changed files with 27 additions and 49 deletions

View File

@@ -95,7 +95,8 @@ namespace OpenRA
public static string GetTerrainType(this World world, int2 cell)
{
return world.TileSet.GetTerrainType(world.Map.MapTiles[cell.X, cell.Y]);
var custom = world.Map.CustomTerrain[cell.X, cell.Y];
return custom != null ? custom : world.TileSet.GetTerrainType(world.Map.MapTiles[cell.X, cell.Y]);
}
public static TerrainTypeInfo GetTerrainInfo(this World world, int2 cell)