diff options
author | maedhros <maedhros@openttd.org> | 2007-07-08 18:40:15 +0000 |
---|---|---|
committer | maedhros <maedhros@openttd.org> | 2007-07-08 18:40:15 +0000 |
commit | fc3764ef4bed671b470d95ea655f34243b163c47 (patch) | |
tree | 1ae20f12354e03d3a16c1f8e2efc220488f17e82 /src/main_gui.cpp | |
parent | c9ef554e0186b747f476f0805586c96f512bd600 (diff) | |
download | openttd-fc3764ef4bed671b470d95ea655f34243b163c47.tar.xz |
(svn r10480) -Fix: Don't allow building lighthouses and transmitters under bridges in the scenario editor, or during world generation.
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 1113c66c3..22ecde8b7 100644 --- 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_RockyArea(TileIndex tile) 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_LightHouse(TileIndex tile) 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; } |