Mercurial > hg > openttd
changeset 8472:99388386f8d8 draft
(svn r12043) -Fix [FS#1736]: allow building transmitters and lighthouses on tree tiles
author | smatz <smatz@openttd.org> |
---|---|
date | Sat, 02 Feb 2008 20:15:20 +0000 |
parents | 1e4ea519bfaf |
children | 75c79ef760e8 |
files | src/terraform_gui.cpp |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -388,7 +388,8 @@ static void PlaceProc_LightHouse(TileIndex tile) { - if (!IsTileType(tile, MP_CLEAR) || GetTileSlope(tile, NULL) != SLOPE_FLAT || IsBridgeAbove(tile)) { + /* not flat || not(trees || clear without bridge above) */ + if (GetTileSlope(tile, NULL) != SLOPE_FLAT || !(IsTileType(tile, MP_TREES) || (IsTileType(tile, MP_CLEAR) && !IsBridgeAbove(tile)))) { return; } @@ -399,7 +400,8 @@ static void PlaceProc_Transmitter(TileIndex tile) { - if (!IsTileType(tile, MP_CLEAR) || GetTileSlope(tile, NULL) != SLOPE_FLAT || IsBridgeAbove(tile)) { + /* not flat || not(trees || clear without bridge above) */ + if (GetTileSlope(tile, NULL) != SLOPE_FLAT || !(IsTileType(tile, MP_TREES) || (IsTileType(tile, MP_CLEAR) && !IsBridgeAbove(tile)))) { return; }