summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-13 15:22:28 +0000
committerrubidium <rubidium@openttd.org>2007-06-13 15:22:28 +0000
commit91420c0d8d63abc3b80fb4957d8d033f7b74c6bb (patch)
tree57238a693b2f212769fd5dff0a1ae903430a824d /src
parenta702f6b3a84ae6beab180a153c92b6c8311de60f (diff)
downloadopenttd-91420c0d8d63abc3b80fb4957d8d033f7b74c6bb.tar.xz
(svn r10140) -Fix [FS#867]: an industry could overbuild a bridge.
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index c783d1681..1ffb83070 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1131,6 +1131,8 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
}
} else {
if (!EnsureNoVehicle(cur_tile)) return false;
+ if (MayHaveBridgeAbove(cur_tile) && IsBridgeAbove(cur_tile)) return false;
+
IndustyBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
if (ind_behav & INDUSTRYBEH_BUILT_ONWATER) {