# HG changeset patch # User belugas # Date 2007-04-08 00:29:12 # Node ID 364eac743a9765f115da78ea6a20ee6ee15df35f # Parent a2b305ac4fc160e43a3b303159f491cbea26258e (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. diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1161,7 +1161,10 @@ static bool CheckIfIndustryTilesAreFree( 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;