Mercurial > hg > openttd
changeset 8370:bf2daa4819d0 draft
(svn r11936) -Fix: 'BRIDGE_TOO_LOW_FOR_TERRAIN'-check was wrong for steep slopes.
author | frosch <frosch@openttd.org> |
---|---|
date | Mon, 21 Jan 2008 15:20:58 +0000 |
parents | cd8726a0f767 |
children | dc34ed2f4803 |
files | src/tunnelbridge_cmd.cpp |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -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 */