summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-11 08:20:57 +0000
committerrubidium <rubidium@openttd.org>2007-07-11 08:20:57 +0000
commite497167dfd6121c71b699a9d73cb9a94796255f5 (patch)
treed56d155e2d1a81145a2a13de4b03623bf4a55677
parentfb92e30dfb4678f679936a166265e90ffa7c48a5 (diff)
downloadopenttd-e497167dfd6121c71b699a9d73cb9a94796255f5.tar.xz
(svn r10506) -Fix: the (manual) building of banks was always rejected.
-rw-r--r--src/industry_cmd.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 3bc22d45b..388621cab 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1232,13 +1232,9 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable
_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);