summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-08-30 21:39:01 +0000
committerbjarni <bjarni@openttd.org>2006-08-30 21:39:01 +0000
commit744840c3daed0828e4fc8e3fca843a29bf6df7d8 (patch)
treee623f356bdcb29cc6664a3dd44ee29114e6db20e /roadveh_cmd.c
parent42682a70aaa9426b271c76c7b5f69ae577ce22bc (diff)
downloadopenttd-744840c3daed0828e4fc8e3fca843a29bf6df7d8.tar.xz
(svn r6246) -Feature: added the many times requested "send all vehicle to depot" button
it's located in the vehicle list screen and does the same as in the shared orders window (send all vehicles in list to a depot) it will still not inform the player if a vehicle failed to find a depot, so don't take for granted that all of them go
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index ec19b5e2e..f4801c7c3 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -367,6 +367,10 @@ int32 CmdSendRoadVehToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
const Depot *dep;
const int32 return_value = HASBIT(p2, 1) ? 0 : CMD_ERROR;
+ if (HASBIT(p2, 1) && (p2 & VLW_FLAGS) == VLW_STANDARD) {
+ return SendAllVehiclesToDepot(VEH_Road, flags, HASBIT(p2, 0), _current_player);
+ }
+
if (!IsValidVehicleID(p1)) return return_value;
v = GetVehicle(p1);