summaryrefslogtreecommitdiff
path: root/src/terraform_gui.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-02 20:15:20 +0000
committersmatz <smatz@openttd.org>2008-02-02 20:15:20 +0000
commit594d6b663cd05c8c31c5566b43d58284f1d18367 (patch)
tree99797e4fac38a43030ce01f5e3b2f499756aaa23 /src/terraform_gui.cpp
parentc05d10dd355f5fcbfdf68066bc8d5cabff9f8e3b (diff)
downloadopenttd-594d6b663cd05c8c31c5566b43d58284f1d18367.tar.xz
(svn r12043) -Fix [FS#1736]: allow building transmitters and lighthouses on tree tiles
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 73c6d645a..3a28abc40 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -388,7 +388,8 @@ static void PlaceProc_RockyArea(TileIndex tile)
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_LightHouse(TileIndex tile)
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;
}