summaryrefslogtreecommitdiff
path: root/src/water_map.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-19 21:15:14 +0000
committerrubidium <rubidium@openttd.org>2007-06-19 21:15:14 +0000
commit55b93b1c058aff7fb67dad186c31855acb2a5724 (patch)
treeb67f71e2772005a10682936e5676aac930f4fe59 /src/water_map.h
parent6e4264237ef3685821da007a4084e29ca86b48b5 (diff)
downloadopenttd-55b93b1c058aff7fb67dad186c31855acb2a5724.tar.xz
(svn r10230) -Fix [FS#594]: terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal.
Diffstat (limited to 'src/water_map.h')
-rw-r--r--src/water_map.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/water_map.h b/src/water_map.h
index cb20bd15a..77fce0a17 100644
--- a/src/water_map.h
+++ b/src/water_map.h
@@ -45,6 +45,11 @@ static inline bool IsCoast(TileIndex t)
return GetWaterTileType(t) == WATER_TILE_COAST;
}
+static inline bool IsCanal(TileIndex t)
+{
+ return GetWaterTileType(t) == WATER_TILE_CLEAR && GetTileOwner(t) != OWNER_WATER;
+}
+
static inline bool IsClearWaterTile(TileIndex t)
{
return IsTileType(t, MP_WATER) && IsWater(t) && GetTileSlope(t, NULL) == SLOPE_FLAT;