Changeset - r9491:1270a6ceeef0
[Not reviewed]
master
0 1 0
rubidium - 16 years ago 2008-06-11 14:13:07
rubidium@openttd.org
(svn r13466) -Fix (r13464): slope checking got lost during development...
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -315,7 +315,7 @@ CommandCost CmdBuildBridge(TileIndex end
 
	} 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
 
		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) {
0 comments (0 inline, 0 general)