a bit more careful, for broken maps

This commit is contained in:
Chris Forbes
2010-01-19 09:03:54 +13:00
parent 382ebbac35
commit 2b77980918

View File

@@ -37,7 +37,8 @@ namespace OpenRa
if (!template.TerrainType.ContainsKey(n)) continue;
if (w.Map.IsInMap(x, y))
if (w.Map.MapTiles[x, y].tile == tile)
if (w.Map.MapTiles[x, y].tile == tile
&& w.Map.MapTiles[x,y].image == n)
{
// stash it
replacedTiles[new int2(x, y)] = w.Map.MapTiles[x, y].image;