summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-10 13:04:31 +0000
committeralberth <alberth@openttd.org>2010-07-10 13:04:31 +0000
commitb06d18b19acfb7d7df4ff520655268e4c21b6d57 (patch)
treec643690797bfe1a76e48e1c5ad6a547e5a717095 /src/rail_cmd.cpp
parent7e0e7fb0e58ab6c1cc2e6763e69f175f876575bf (diff)
downloadopenttd-b06d18b19acfb7d7df4ff520655268e4c21b6d57.tar.xz
(svn r20110) -Fix [FS#3695]: Do not allow building a rail track to the water using a tree-tile.
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index ee68bd69c..b84f23397 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -329,7 +329,7 @@ Foundation GetRailFoundation(Slope tileh, TrackBits bits)
static CommandCost CheckRailSlope(Slope tileh, TrackBits rail_bits, TrackBits existing, TileIndex tile)
{
/* don't allow building on the lower side of a coast */
- if (IsTileType(tile, MP_WATER) || (IsTileType(tile, MP_RAILWAY) && (GetRailGroundType(tile) == RAIL_GROUND_WATER))) {
+ if (GetFloodingBehaviour(tile) != FLOOD_NONE) {
if (!IsSteepSlope(tileh) && ((~_valid_tracks_on_leveled_foundation[tileh] & (rail_bits | existing)) != 0)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
}