Changeset - r16099:8dde408398d9
[Not reviewed]
master
0 3 0
frosch - 14 years ago 2010-09-13 19:45:39
frosch@openttd.org
(svn r20802) -Fix: Building bridges on water/watery objects behaved inconsistently for towns and the bridge selection GUI.
3 files changed with 3 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/bridge_gui.cpp
Show inline comments
 
@@ -383,7 +383,7 @@ void ShowBuildBridgeWindow(TileIndex sta
 
	/* only query bridge building possibility once, result is the same for all bridges!
 
	 * returns CMD_ERROR on failure, and price on success */
 
	StringID errmsg = INVALID_STRING_ID;
 
	CommandCost ret = DoCommand(end, start, type, DC_AUTO | DC_QUERY_COST, CMD_BUILD_BRIDGE);
 
	CommandCost ret = DoCommand(end, start, type, CommandFlagsToDCFlags(GetCommandFlags(CMD_BUILD_BRIDGE)) | DC_QUERY_COST, CMD_BUILD_BRIDGE);
 

	
 
	GUIBridgeList *bl = NULL;
 
	if (ret.Failed()) {
src/town_cmd.cpp
Show inline comments
 
@@ -1000,8 +1000,8 @@ static bool GrowTownWithBridge(const Tow
 
		byte bridge_type = RandomRange(MAX_BRIDGES - 1);
 

	
 
		/* Can we actually build the bridge? */
 
		if (DoCommand(tile, bridge_tile, bridge_type | ROADTYPES_ROAD << 8 | TRANSPORT_ROAD << 15, DC_AUTO, CMD_BUILD_BRIDGE).Succeeded()) {
 
			DoCommand(tile, bridge_tile, bridge_type | ROADTYPES_ROAD << 8 | TRANSPORT_ROAD << 15, DC_EXEC | DC_AUTO, CMD_BUILD_BRIDGE);
 
		if (DoCommand(tile, bridge_tile, bridge_type | ROADTYPES_ROAD << 8 | TRANSPORT_ROAD << 15, CommandFlagsToDCFlags(GetCommandFlags(CMD_BUILD_BRIDGE)), CMD_BUILD_BRIDGE).Succeeded()) {
 
			DoCommand(tile, bridge_tile, bridge_type | ROADTYPES_ROAD << 8 | TRANSPORT_ROAD << 15, DC_EXEC | CommandFlagsToDCFlags(GetCommandFlags(CMD_BUILD_BRIDGE)), CMD_BUILD_BRIDGE);
 
			_grow_town_result = GROWTH_SUCCEED;
 
			return true;
 
		}
src/tunnelbridge_cmd.cpp
Show inline comments
 
@@ -257,11 +257,6 @@ CommandCost CmdBuildBridge(TileIndex end
 
		if (bridge_len > (_settings_game.construction.longbridges ? 100U : 16U)) return_cmd_error(STR_ERROR_BRIDGE_TOO_LONG);
 
	}
 

	
 
	/* retrieve landscape height and ensure it's on land */
 
	if (IsWaterTile(tile_start) || IsWaterTile(tile_end)) {
 
		return_cmd_error(STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH);
 
	}
 

	
 
	uint z_start;
 
	uint z_end;
 
	Slope tileh_start = GetTileSlope(tile_start, &z_start);
0 comments (0 inline, 0 general)