(svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost.

This commit is contained in:
alberth
2010-03-05 21:20:22 +00:00
parent ef1b27a18d
commit 4c0d4990f5
10 changed files with 109 additions and 42 deletions

View File

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