From 6cbd4cc167c31b71bc833449c7322b2b42d4fdfc Mon Sep 17 00:00:00 2001 From: bjarni Date: Sun, 27 Aug 2006 09:28:52 +0000 Subject: (svn r6165) -Feature: control click Goto Depot will now make the vehicle service at the depot and leave right away. To tell the difference the status of stopping vehicles will be in red, while servicing vehicles will be green. -Codechange: remove some dead code in CmdSendAircraftToHangar() since it is conflicting with new functionality. Now p2 means the same for all types --- ship_cmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ship_cmd.c') diff --git a/ship_cmd.c b/ship_cmd.c index 4fceb3da3..94eeab5a6 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -995,7 +995,7 @@ int32 CmdStartStopShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) /** Send a ship to the depot. * @param tile unused * @param p1 vehicle ID to send to the depot - * @param p2 unused + * @param p2 p2 if bit 0 is set, then the ship will only service at the depot. 0 Makes it stop inside */ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) { @@ -1032,7 +1032,8 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { v->dest_tile = dep->xy; v->current_order.type = OT_GOTO_DEPOT; - v->current_order.flags = OF_NON_STOP | OF_HALT_IN_DEPOT; + v->current_order.flags = OF_NON_STOP; + if (!HASBIT(p2,0)) SETBIT(v->current_order.flags, OFB_HALT_IN_DEPOT); v->current_order.dest.depot = dep->index; InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } -- cgit v1.2.3-70-g09d2