summaryrefslogtreecommitdiff
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
commitf3663fd25cecb43c93bd783973bb322c597a2064 (patch)
tree99797e4fac38a43030ce01f5e3b2f499756aaa23
parent1d891a8b15f750ea7aaa14622536e87765c59e7a (diff)
downloadopenttd-f3663fd25cecb43c93bd783973bb322c597a2064.tar.xz
(svn r12043) -Fix [FS#1736]: allow building transmitters and lighthouses on tree tiles
-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;
}