diff options
author | smatz <smatz@openttd.org> | 2008-02-17 21:27:44 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-02-17 21:27:44 +0000 |
commit | d75cccf5d53d5c8c206993b8aa34114e7e9844f1 (patch) | |
tree | 5dc8053aac29a312881ef952893822dae5870eeb /src/tunnelbridge_cmd.cpp | |
parent | 6bf44158c5a88caf59d9915a49cdbaba5774de46 (diff) | |
download | openttd-d75cccf5d53d5c8c206993b8aa34114e7e9844f1.tar.xz |
(svn r12170) -Fix: do not draw trees along road and street lights under low bridges (spotted by _minime_)
Diffstat (limited to 'src/tunnelbridge_cmd.cpp')
-rw-r--r-- | src/tunnelbridge_cmd.cpp | 6 |
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); } |