(svn r19269) -Codechange: PerformIndustryTileSlopeCheck() returns a succeeded or failed command.

This commit is contained in:
alberth
2010-02-27 10:21:59 +00:00
parent 1c66ce9ea3
commit b33264f30f
3 changed files with 23 additions and 10 deletions

View File

@@ -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);