(svn r10506) -Fix: the (manual) building of banks was always rejected.
authorrubidium
Wed, 11 Jul 2007 08:20:57 +0000
changeset 7227 76ebda957d0e
parent 7226 3e15150d5a23
child 7228 24f0a19ca622
(svn r10506) -Fix: the (manual) building of banks was always rejected.
src/industry_cmd.cpp
--- a/src/industry_cmd.cpp	Wed Jul 11 02:13:00 2007 +0000
+++ b/src/industry_cmd.cpp	Wed Jul 11 08:20:57 2007 +0000
@@ -1232,13 +1232,9 @@
 					_error_message = STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS;
 					return false;
 				}
-			}
-			if (ind_behav & INDUSTRYBEH_ONLY_NEARTOWN) {
-				if (!IsTileType(cur_tile, MP_HOUSE)) goto do_clear;
-			} else {
-do_clear:
-				if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR)))
-					return false;
+				if (CmdFailed(DoCommand(cur_tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR))) return false;
+			} else if ((ind_behav & INDUSTRYBEH_ONLY_NEARTOWN) == 0 || !IsTileType(cur_tile, MP_HOUSE)) {
+				if (CmdFailed(DoCommand(cur_tile, 0, 0, DC_AUTO, CMD_LANDSCAPE_CLEAR))) return false;
 			}
 		}
 	} while ((++it)->ti.x != -0x80);