From 323c526a4d344025b3ba30ade5923c0d41431d8c Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 5 Sep 2010 16:00:04 +0000 Subject: (svn r20747) -Fix: overbuilding an object with water under it succeeded even for industries that can't be build on water --- src/industry_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/industry_cmd.cpp') diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index fcd6fafca..c9852472c 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -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; -- cgit v1.2.3-54-g00ecf