diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bridge_gui.cpp | 2 | ||||
-rw-r--r-- | src/town_cmd.cpp | 4 | ||||
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 5 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 4b55a0e4b..303979754 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -383,7 +383,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo /* 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()) { diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index df0813ff2..bef8301ee 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -1000,8 +1000,8 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi 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; } diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index fea58a6a5..de619adc6 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -257,11 +257,6 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u 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); |