summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-06-11 14:13:07 +0000
committerrubidium <rubidium@openttd.org>2008-06-11 14:13:07 +0000
commit93fb5bc63dab2eabd0aa75e45f1eb1ce1fecae85 (patch)
treef71403bc40b09439a9f61ca512f50f5edb4f2e0d /src/tunnelbridge_cmd.cpp
parent7f6382badd3ea4f2c21920c9951997d4b431d0a2 (diff)
downloadopenttd-93fb5bc63dab2eabd0aa75e45f1eb1ce1fecae85.tar.xz
(svn r13466) -Fix (r13464): slope checking got lost during development...
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index 16cedfdac..1915c1454 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -315,7 +315,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p
} else {
/* Build a new bridge. */
- bool allow_on_slopes = (!_is_old_ai_player && _settings_game.construction.build_on_slopes);
+ bool allow_on_slopes = (!_is_old_ai_player && _settings_game.construction.build_on_slopes && transport_type != TRANSPORT_WATER);
/* Try and clear the start landscape */
ret = DoCommand(tile_start, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
@@ -335,6 +335,8 @@ CommandCost CmdBuildBridge(TileIndex end_tile, uint32 flags, uint32 p1, uint32 p
if (CmdFailed(terraform_cost_south) || (terraform_cost_south.GetCost() != 0 && !allow_on_slopes))
return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
cost.AddCost(terraform_cost_south);
+
+ if (transport_type == TRANSPORT_WATER && (tileh_start == SLOPE_FLAT || tileh_end == SLOPE_FLAT)) return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
}
if (!replace_bridge) {