diff options
author | alberth <alberth@openttd.org> | 2010-03-05 21:20:22 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-05 21:20:22 +0000 |
commit | c395b93acd69106df6005e66264d9114e0198440 (patch) | |
tree | 5cab6ad9aa5c0ff7ee6ddb129ed9b8d439bbedbe /src/industry_cmd.cpp | |
parent | 0bfd06245b57aa1276cc321fc8d841fd655f7b79 (diff) | |
download | openttd-c395b93acd69106df6005e66264d9114e0198440.tar.xz |
(svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 0ebe23c9a..66686ee9f 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1337,7 +1337,9 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil return_cmd_error(STR_ERROR_SITE_UNSUITABLE); } } else { - if (!EnsureNoVehicleOnGround(cur_tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE); + CommandCost ret = EnsureNoVehicleOnGround(cur_tile); + ret.SetGlobalErrorMessage(); + if (ret.Failed()) return ret; if (MayHaveBridgeAbove(cur_tile) && IsBridgeAbove(cur_tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE); const IndustryTileSpec *its = GetIndustryTileSpec(gfx); |