summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-08-27 09:28:52 +0000
committerbjarni <bjarni@openttd.org>2006-08-27 09:28:52 +0000
commit6cbd4cc167c31b71bc833449c7322b2b42d4fdfc (patch)
tree585e4dad61b4e846d7d84cbb77843c694b54e278 /train_gui.c
parentd3096b84fdab85a0688eff8f3a6d1d2618d3162d (diff)
downloadopenttd-6cbd4cc167c31b71bc833449c7322b2b42d4fdfc.tar.xz
(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
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/train_gui.c b/train_gui.c
index 04e92e56f..609434199 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -975,7 +975,11 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
case OT_GOTO_DEPOT: {
Depot *dep = GetDepot(v->current_order.dest.depot);
SetDParam(0, dep->town_index);
- str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_TRAIN_DEPOT + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_TRAIN_DEPOT_SERVICE + _patches.vehicle_speed;
+ }
SetDParam(1, v->u.rail.last_speed);
} break;
@@ -1021,7 +1025,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e)
break;
case 7: /* goto depot */
/* TrainGotoDepot has a nice randomizer in the pathfinder, which causes desyncs... */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_TRAIN_GOTO_DEPOT | CMD_NO_TEST_IF_IN_NETWORK | CMD_MSG(STR_8830_CAN_T_SEND_TRAIN_TO_DEPOT));
break;
case 8: /* force proceed */
DoCommandP(v->tile, v->index, 0, NULL, CMD_FORCE_TRAIN_PROCEED | CMD_MSG(STR_8862_CAN_T_MAKE_TRAIN_PASS_SIGNAL));