diff options
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp index 9bb96538d..49b987d0a 100644 --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -376,15 +376,13 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u const TileIndex heads[] = {tile_start, tile_end}; for (int i = 0; i < 2; i++) { - if (MayHaveBridgeAbove(heads[i])) { - if (IsBridgeAbove(heads[i])) { - TileIndex north_head = GetNorthernBridgeEnd(heads[i]); + if (IsBridgeAbove(heads[i])) { + TileIndex north_head = GetNorthernBridgeEnd(heads[i]); - if (direction == GetBridgeAxis(heads[i])) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); + if (direction == GetBridgeAxis(heads[i])) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); - if (z_start + 1 == GetBridgeHeight(north_head)) { - return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); - } + if (z_start + 1 == GetBridgeHeight(north_head)) { + return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); } } } @@ -393,7 +391,7 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u for (TileIndex tile = tile_start + delta; tile != tile_end; tile += delta) { if (GetTileMaxZ(tile) > z_start) return_cmd_error(STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN); - if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) { + if (IsBridgeAbove(tile)) { /* Disallow crossing bridges for the time being */ return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); } |