summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-17 13:56:11 +0000
committerrubidium <rubidium@openttd.org>2008-08-17 13:56:11 +0000
commite4e563afc23d619847929137a2d10de438cae38a (patch)
tree5108b2fe0ad1880c5b0f61867d9c5d51f4a381dd
parent8035f120b41c31b7b20d2f8b67612cd90e449712 (diff)
downloadopenttd-e4e563afc23d619847929137a2d10de438cae38a.tar.xz
(svn r14093) -Fix [FS#2230]: don't flood a NewGRF industry when it implicitly tells that it wants to be build on water (land shape flags bit 5).
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 19fb92f38..41be3a9f2 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -423,7 +423,9 @@ static CommandCost ClearTile_Industry(TileIndex tile, byte flags)
if ((_current_player != OWNER_WATER && _game_mode != GM_EDITOR &&
!_cheats.magic_bulldozer.value) ||
((flags & DC_AUTO) != 0) ||
- (_current_player == OWNER_WATER && (indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER))) {
+ (_current_player == OWNER_WATER &&
+ ((indspec->behaviour & INDUSTRYBEH_BUILT_ONWATER) ||
+ HasBit(GetIndustryTileSpec(GetIndustryGfx(tile))->slopes_refused, 5)))) {
SetDParam(0, indspec->name);
return_cmd_error(STR_4800_IN_THE_WAY);
}