summaryrefslogtreecommitdiff
path: root/src/unmovable_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-05 21:20:22 +0000
committeralberth <alberth@openttd.org>2010-03-05 21:20:22 +0000
commitc395b93acd69106df6005e66264d9114e0198440 (patch)
tree5cab6ad9aa5c0ff7ee6ddb129ed9b8d439bbedbe /src/unmovable_cmd.cpp
parent0bfd06245b57aa1276cc321fc8d841fd655f7b79 (diff)
downloadopenttd-c395b93acd69106df6005e66264d9114e0198440.tar.xz
(svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost.
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r--src/unmovable_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index 55fe0a4c5..039a0162f 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -177,7 +177,9 @@ CommandCost CmdSellLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (!IsOwnedLandTile(tile)) return CMD_ERROR;
if (!CheckTileOwnership(tile) && _current_company != OWNER_WATER) return CMD_ERROR;
- if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
+ CommandCost ret = EnsureNoVehicleOnGround(tile);
+ ret.SetGlobalErrorMessage();
+ if (ret.Failed()) return ret;
if (flags & DC_EXEC) DoClearSquare(tile);