summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-04-08 00:29:12 +0000
committerbelugas <belugas@openttd.org>2007-04-08 00:29:12 +0000
commit12addc1bbee7c46a3d7c8d4fc0140a0abbfff327 (patch)
treefb695621ba1101601aaca2b3b1d96dd6b8bf4ba1 /src
parent6b35482c8d2cf78bd1092c60002ac29bb2e29e9c (diff)
downloadopenttd-12addc1bbee7c46a3d7c8d4fc0140a0abbfff327.tar.xz
(svn r9574) -Fix(r9520, FS#721): Oil Rig ( or industry with behaviour INDUSTRYBEH_BUILT_ONWATER) should check all tiles before leaving the test. A tile in water does not ensure that all required tiles will necessary be on water.
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index ebd231edb..bfa21881a 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1161,7 +1161,10 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
IndustyBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
if (ind_behav & INDUSTRYBEH_BUILT_ONWATER) {
- return IsClearWaterTile(cur_tile);
+ /* As soon as the tile is not water, bail out.
+ * But that does not mean the search is over. You have
+ * to make sure every tile of the industry will be only water*/
+ if (!IsClearWaterTile(cur_tile)) return false;
} else {
Slope tileh;