(svn r11952) -Fix (r11926): Prevent industries from being built on rivers, unless they require water.

This commit is contained in:
peter1138
2008-01-22 22:17:28 +00:00
parent 3a423a8747
commit da53070a38
2 changed files with 6 additions and 1 deletions

View File

@@ -1226,7 +1226,7 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
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 false;
if (!HasBit(its->slopes_refused, 5) && ((IsWaterTile(cur_tile) || IsRiverTile(cur_tile)) == !(ind_behav & INDUSTRYBEH_BUILT_ONWATER))) return false;
if (HasBit(its->callback_flags, CBM_INDT_SHAPE_CHECK)) {
custom_shape = true;