summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-02-27 10:21:59 +0000
committeralberth <alberth@openttd.org>2010-02-27 10:21:59 +0000
commitb33264f30f598244f24fae9ed2aca7adc037f831 (patch)
treec275bc0fa5b83c7c459dd5973adc8d7b4bed8d53 /src/industry_cmd.cpp
parent1c66ce9ea3affb6c33389dd0ac3b3c2a832fa335 (diff)
downloadopenttd-b33264f30f598244f24fae9ed2aca7adc037f831.tar.xz
(svn r19269) -Codechange: PerformIndustryTileSlopeCheck() returns a succeeded or failed command.
Diffstat (limited to 'src/industry_cmd.cpp')
-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 ec52c15b0..f4eee73e3 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1349,7 +1349,9 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil
if (HasBit(its->callback_mask, CBM_INDT_SHAPE_CHECK)) {
custom_shape = true;
- if (!PerformIndustryTileSlopeCheck(tile, cur_tile, its, type, gfx, itspec_index)) return_cmd_error(_error_message);
+ CommandCost ret = PerformIndustryTileSlopeCheck(tile, cur_tile, its, type, gfx, itspec_index);
+ ret.SetGlobalErrorMessage();
+ if (ret.Failed()) return ret;
} else {
Slope tileh = GetTileSlope(cur_tile, NULL);
refused_slope |= IsSlopeRefused(tileh, its->slopes_refused);