mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-07 06:39:08 +00:00
(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.
This commit is contained in:
parent
6b35482c8d
commit
12addc1bbe
@ -1161,7 +1161,10 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
|
|||||||
IndustyBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
|
IndustyBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
|
||||||
|
|
||||||
if (ind_behav & INDUSTRYBEH_BUILT_ONWATER) {
|
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 {
|
} else {
|
||||||
Slope tileh;
|
Slope tileh;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user