mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r20747) -Fix: overbuilding an object with water under it succeeded even for industries that can't be build on water
This commit is contained in:
parent
a9cdcb02f5
commit
323c526a4d
|
@ -1337,7 +1337,7 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil
|
|||
IndustryBehaviour ind_behav = GetIndustrySpec(type)->behaviour;
|
||||
|
||||
/* Perform land/water check if not disabled */
|
||||
if (!HasBit(its->slopes_refused, 5) && (IsWaterTile(cur_tile) == !(ind_behav & INDUSTRYBEH_BUILT_ONWATER))) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
if (!HasBit(its->slopes_refused, 5) && ((HasTileWaterClass(cur_tile) && IsTileOnWater(cur_tile)) == !(ind_behav & INDUSTRYBEH_BUILT_ONWATER))) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
|
||||
if (HasBit(its->callback_mask, CBM_INDT_SHAPE_CHECK)) {
|
||||
custom_shape = true;
|
||||
|
|
Loading…
Reference in New Issue