summaryrefslogtreecommitdiff
path: root/roadveh_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
commit422d0739104cf0a778ec7b01c363adc9deb9d54a (patch)
tree585e4dad61b4e846d7d84cbb77843c694b54e278 /roadveh_gui.c
parent6f9276ed578336abf7b43b96404f6be82e9fe8f8 (diff)
downloadopenttd-422d0739104cf0a778ec7b01c363adc9deb9d54a.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 'roadveh_gui.c')
-rw-r--r--roadveh_gui.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index a60d5d125..64bddc8a0 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -343,7 +343,11 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
Depot *depot = GetDepot(v->current_order.dest.depot);
SetDParam(0, depot->town_index);
SetDParam(1, v->cur_speed / 2);
- str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
+ if (HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
+ str = STR_HEADING_FOR_ROAD_DEPOT + _patches.vehicle_speed;
+ } else {
+ str = STR_HEADING_FOR_ROAD_DEPOT_SERVICE + _patches.vehicle_speed;
+ }
} break;
case OT_LOADING:
@@ -379,7 +383,7 @@ static void RoadVehViewWndProc(Window *w, WindowEvent *e)
ScrollMainWindowTo(v->x_pos, v->y_pos);
break;
case 7: /* goto depot */
- DoCommandP(v->tile, v->index, 0, NULL, CMD_SEND_ROADVEH_TO_DEPOT | CMD_MSG(STR_9018_CAN_T_SEND_VEHICLE_TO_DEPOT));
+ DoCommandP(v->tile, v->index, _ctrl_pressed ? 1 : 0, NULL, CMD_SEND_ROADVEH_TO_DEPOT | CMD_MSG(STR_9018_CAN_T_SEND_VEHICLE_TO_DEPOT));
break;
case 8: /* turn around */
DoCommandP(v->tile, v->index, 0, NULL, CMD_TURN_ROADVEH | CMD_MSG(STR_9033_CAN_T_MAKE_VEHICLE_TURN));