From 3e5a87a52cc8355a2a5c2831c60643bf30d41a3a Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 11 Jan 2010 20:21:56 +0000 Subject: (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. --- src/vehicle_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicle_cmd.cpp') 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; -- cgit v1.2.3-54-g00ecf