diff options
author | tron <tron@openttd.org> | 2006-05-21 11:34:08 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-05-21 11:34:08 +0000 |
commit | 1706164ff7ef6e0da5b05ac2d774fb87b5c349aa (patch) | |
tree | 9c3b4dc89f3074d62fa671598258426160248e38 /rail_cmd.c | |
parent | e693290ed136bed943f34b410a09837bf20a0f21 (diff) | |
download | openttd-1706164ff7ef6e0da5b05ac2d774fb87b5c349aa.tar.xz |
(svn r4937) Reduce the use of _error_message a bit
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index 203f83119..ec819ab36 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -904,6 +904,7 @@ int32 CmdConvertRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) money = GetAvailableMoneyForCommand(); cost = 0; + ret = 0; for (x = sx; x <= ex; ++x) { for (y = sy; y <= ey; ++y) { @@ -933,7 +934,7 @@ int32 CmdConvertRail(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) } } - return (cost == 0) ? CMD_ERROR : cost; + return (cost == 0) ? ret : cost; } static int32 RemoveTrainDepot(TileIndex tile, uint32 flags) |