(svn r13466) -Fix (r13464): slope checking got lost during development...
authorrubidium
Wed, 11 Jun 2008 14:13:07 +0000
changeset 10914 7ca27172ba4c
parent 10913 af60a6eda0a0
child 10916 a76c70af4e91
(svn r13466) -Fix (r13464): slope checking got lost during development...
src/tunnelbridge_cmd.cpp
--- a/src/tunnelbridge_cmd.cpp	Wed Jun 11 13:54:01 2008 +0000
+++ b/src/tunnelbridge_cmd.cpp	Wed Jun 11 14:13:07 2008 +0000
@@ -315,7 +315,7 @@
 	} 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 @@
 		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) {