(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).
authorrubidium
Sun, 17 Aug 2008 13:56:11 +0000
changeset 9938 69311c7f3af3
parent 9937 7badd14899f9
child 9939 ba050f82ad30
(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).
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Sun Aug 17 11:52:06 2008 +0000
+++ b/src/industry_cmd.cpp	Sun Aug 17 13:56:11 2008 +0000
@@ -423,7 +423,9 @@
 	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);
 	}