summaryrefslogtreecommitdiff
path: root/src/tunnelbridge_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r--src/tunnelbridge_cmd.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp
index d04c32ed6..c838b87b1 100644
--- a/src/tunnelbridge_cmd.cpp
+++ b/src/tunnelbridge_cmd.cpp
@@ -663,10 +663,16 @@ static CommandCost DoClearBridge(TileIndex tile, uint32 flags)
/* read this value before actual removal of bridge */
bool rail = GetTunnelBridgeTransportType(tile) == TRANSPORT_RAIL;
Owner owner = GetTileOwner(tile);
+ uint height = GetBridgeHeight(tile);
DoClearSquare(tile);
DoClearSquare(endtile);
for (TileIndex c = tile + delta; c != endtile; c += delta) {
+ /* do not let trees appear from 'nowhere' after removing bridge */
+ if (IsNormalRoadTile(c) && GetRoadside(c) == ROADSIDE_TREES) {
+ uint minz = GetTileMaxZ(c) + 3 * TILE_HEIGHT;
+ if (height < minz) SetRoadside(c, ROADSIDE_PAVED);
+ }
ClearBridgeMiddle(c);
MarkTileDirtyByTile(c);
}