summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-11 20:21:56 +0000
committerrubidium <rubidium@openttd.org>2010-01-11 20:21:56 +0000
commit3e5a87a52cc8355a2a5c2831c60643bf30d41a3a (patch)
tree87420f35edef10eaeb6bffbb5604c865beb9076d /src/vehicle_cmd.cpp
parent6a047d2316dc49a8e75f14a0e73c59d1d55c568c (diff)
downloadopenttd-3e5a87a52cc8355a2a5c2831c60643bf30d41a3a.tar.xz
(svn r18783) -Codechange: make CheckCompanyHasMoney set an error on the CommandCost it tests when you don't have enough money instead of setting a global variable.
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index a28436654..9345b8a32 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -588,7 +588,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
/* The vehicle has already been bought, so now it must be sold again. */
DoCommand(w_front->tile, w_front->index, 1, flags, GetCmdSellVeh(w_front));
}
- return CMD_ERROR;
+ return total_cost;
}
return total_cost;