summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_tile.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-01-04 18:33:43 +0000
committeryexo <yexo@openttd.org>2010-01-04 18:33:43 +0000
commitb378e82676b299dc8d579cd2ac020758fbf52f84 (patch)
tree044688328cdbf84c799fd452f4c38c3132943db1 /src/ai/api/ai_tile.cpp
parent3e131e2fece740591d9187e19789a34b36c763fa (diff)
downloadopenttd-b378e82676b299dc8d579cd2ac020758fbf52f84.tar.xz
(svn r18719) -Feature: don't delete the rough/rocky status of a tile when it's covered by snow, this allows rocky tiles under snow if you have a variable snowline
Diffstat (limited to 'src/ai/api/ai_tile.cpp')
-rw-r--r--src/ai/api/ai_tile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/api/ai_tile.cpp b/src/ai/api/ai_tile.cpp
index a1c2f1c5e..aeaba0b06 100644
--- a/src/ai/api/ai_tile.cpp
+++ b/src/ai/api/ai_tile.cpp
@@ -112,21 +112,21 @@
{
if (!::IsValidTile(tile)) return false;
- return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROCKS));
+ return (::IsTileType(tile, MP_CLEAR) && ::GetRawClearGround(tile) == ::CLEAR_ROCKS);
}
/* static */ bool AITile::IsRoughTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;
- return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_ROUGH));
+ return (::IsTileType(tile, MP_CLEAR) && ::GetRawClearGround(tile) == ::CLEAR_ROUGH);
}
/* static */ bool AITile::IsSnowTile(TileIndex tile)
{
if (!::IsValidTile(tile)) return false;
- return (::IsTileType(tile, MP_CLEAR) && ::IsClearGround(tile, CLEAR_SNOW));
+ return (::IsTileType(tile, MP_CLEAR) && ::IsSnowTile(tile));
}
/* static */ bool AITile::IsDesertTile(TileIndex tile)