From cada1e24b50d0a218b9b5ceadefed76b3d848bc5 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 14 Apr 2005 11:17:36 +0000 Subject: (svn r2195) Add CmdFailed() as the One True Way(tm) to check if a command failed. --- rail_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rail_cmd.c') diff --git a/rail_cmd.c b/rail_cmd.c index 2a243b17f..b7724d553 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -307,7 +307,7 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags, switch (m5 & 0x38) { // what's under the bridge? case 0x00: // clear land ret = CheckRailSlope(tileh, rail_bit, 0, tile); - if (ret & CMD_ERROR) return ret; + if (CmdFailed(ret)) return ret; cost += ret; if (flags & DC_EXEC) { @@ -340,7 +340,7 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags, } ret = CheckRailSlope(tileh, rail_bit, m5 & RAIL_BIT_MASK, tile); - if (ret & CMD_ERROR) return ret; + if (CmdFailed(ret)) return ret; cost += ret; if (flags & DC_EXEC) _map5[tile] = m5 | rail_bit; @@ -370,11 +370,11 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags, default: ret = CheckRailSlope(tileh, rail_bit, 0, tile); - if (ret & CMD_ERROR) return ret; + if (CmdFailed(ret)) return ret; cost += ret; ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); - if (ret == CMD_ERROR) return ret; + if (CmdFailed(ret)) return ret; cost += ret; if (flags & DC_EXEC) { -- cgit v1.2.3-54-g00ecf