diff src/main_gui.cpp @ 7202:ac79a8118863 draft

(svn r10480) -Fix: Don't allow building lighthouses and transmitters under bridges in the scenario editor, or during world generation.
author maedhros <maedhros@openttd.org>
date Sun, 08 Jul 2007 18:40:15 +0000
parents 2116c82efa49
children c0dfb44fa0b8
line wrap: on
line diff
--- a/src/main_gui.cpp
+++ b/src/main_gui.cpp
@@ -31,6 +31,7 @@
 #include "variables.h"
 #include "train.h"
 #include "roadveh.h"
+#include "bridge_map.h"
 #include "unmovable_map.h"
 #include "string.h"
 #include "screenshot.h"
@@ -1137,7 +1138,7 @@
 
 static void PlaceProc_LightHouse(TileIndex tile)
 {
-	if (!IsTileType(tile, MP_CLEAR) || IsSteepSlope(GetTileSlope(tile, NULL))) {
+	if (!IsTileType(tile, MP_CLEAR) || IsSteepSlope(GetTileSlope(tile, NULL)) || IsBridgeAbove(tile)) {
 		return;
 	}
 
@@ -1148,7 +1149,7 @@
 
 static void PlaceProc_Transmitter(TileIndex tile)
 {
-	if (!IsTileType(tile, MP_CLEAR) || IsSteepSlope(GetTileSlope(tile, NULL))) {
+	if (!IsTileType(tile, MP_CLEAR) || IsSteepSlope(GetTileSlope(tile, NULL)) || IsBridgeAbove(tile)) {
 		return;
 	}