summaryrefslogtreecommitdiff
path: root/src/water_map.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2008-01-22 22:17:28 +0000
committerpeter1138 <peter1138@openttd.org>2008-01-22 22:17:28 +0000
commitb5534e42a0a87aa3ce75e2d1ae4c6a8b9e53c540 (patch)
tree14109ed3e9bb1cccb49d11a1a960f2d9ff8d66a6 /src/water_map.h
parent171e84cbad07c10f816200d0db1ccbfb0de65695 (diff)
downloadopenttd-b5534e42a0a87aa3ce75e2d1ae4c6a8b9e53c540.tar.xz
(svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water.
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 93ec67a9d..d7d0b0ba8 100644
--- a/src/water_map.h
+++ b/src/water_map.h
@@ -72,6 +72,11 @@ static inline bool IsWaterTile(TileIndex t)
return IsTileType(t, MP_WATER) && IsWater(t);
}
+static inline bool IsRiverTile(TileIndex t)
+{
+ return IsTileType(t, MP_WATER) && IsRiver(t);
+}
+
static inline TileIndex GetOtherShipDepotTile(TileIndex t)
{
return t + (HasBit(_m[t].m5, 0) ? -1 : 1) * (HasBit(_m[t].m5, 1) ? TileDiffXY(0, 1) : TileDiffXY(1, 0));