(svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water.

This commit is contained in:
peter1138
2008-01-22 22:17:28 +00:00
parent 3a423a8747
commit da53070a38
2 changed files with 6 additions and 1 deletions

View File

@@ -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));