1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

(svn r19415) -Codechange: Forward CommandCost with an error back to the caller.

This commit is contained in:
alberth
2010-03-14 12:58:51 +00:00
parent 777123c228
commit 3b367ab708
6 changed files with 27 additions and 19 deletions

View File

@@ -904,7 +904,7 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
}
CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (cost.Failed()) return CMD_ERROR;
if (cost.Failed()) return cost;
if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);