From da53070a38eae085f70fee28aecd67f22df1c9f2 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Tue, 22 Jan 2008 22:17:28 +0000 Subject: (svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water. --- src/water_map.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/water_map.h') 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)); -- cgit v1.2.3-54-g00ecf