(svn r12043) -Fix [FS#1736]: allow building transmitters and lighthouses on tree tiles
authorsmatz
Sat, 02 Feb 2008 20:15:20 +0000
changeset 8472 2a14ce1a7a43
parent 8471 ba4c15fe147b
child 8473 c8613732cd3b
(svn r12043) -Fix [FS#1736]: allow building transmitters and lighthouses on tree tiles
src/terraform_gui.cpp
--- a/src/terraform_gui.cpp	Sat Feb 02 09:28:43 2008 +0000
+++ b/src/terraform_gui.cpp	Sat Feb 02 20:15:20 2008 +0000
@@ -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;
 	}