# HG changeset patch # User frosch # Date 1200928858 0 # Node ID 1e2ffbfaaf1c6e0f30c28c9d4d6e9a27e11bb00c # Parent 1884a11b74dee7b6346ddcfb6d17863c6b1efc08 (svn r11936) -Fix: 'BRIDGE_TOO_LOW_FOR_TERRAIN'-check was wrong for steep slopes. diff -r 1884a11b74de -r 1e2ffbfaaf1c src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp Mon Jan 21 10:31:27 2008 +0000 +++ b/src/tunnelbridge_cmd.cpp Mon Jan 21 15:20:58 2008 +0000 @@ -364,9 +364,7 @@ delta = (direction == AXIS_X ? TileDiffXY(1, 0) : TileDiffXY(0, 1)); for (tile = tile_start + delta; tile != tile_end; tile += delta) { - uint z; - - if (GetTileSlope(tile, &z) != SLOPE_FLAT && z >= z_start) return_cmd_error(STR_BRIDGE_TOO_LOW_FOR_TERRAIN); + if (GetTileMaxZ(tile) > z_start) return_cmd_error(STR_BRIDGE_TOO_LOW_FOR_TERRAIN); if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile) && !replace_bridge) { /* Disallow crossing bridges for the time being */