forked from mirror/OpenTTD
(svn r19372) -Codechange: CheckTileOwnership() returns a CommandCost.
This commit is contained in:
@@ -911,7 +911,11 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
|
||||
static CommandCost RemoveRoadDepot(TileIndex tile, DoCommandFlag flags)
|
||||
{
|
||||
if (!CheckTileOwnership(tile) && _current_company != OWNER_WATER) return CMD_ERROR;
|
||||
if (_current_company != OWNER_WATER) {
|
||||
CommandCost ret = CheckTileOwnership(tile);
|
||||
ret.SetGlobalErrorMessage();
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
||||
CommandCost ret = EnsureNoVehicleOnGround(tile);
|
||||
ret.SetGlobalErrorMessage();
|
||||
|
Reference in New Issue
Block a user