diff options
author | frosch <frosch@openttd.org> | 2011-01-31 20:44:15 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-01-31 20:44:15 +0000 |
commit | a97d52a29a990132a8a5e4dd60304483617cec50 (patch) | |
tree | 0d8d42d633feabb438f812cedf0534a3c665074e /src/vehicle_gui.cpp | |
parent | 67a5cd0b185158ca4926c8cb45f1735a1001e00b (diff) | |
download | openttd-a97d52a29a990132a8a5e4dd60304483617cec50.tar.xz |
(svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index e16b8deee..a6197c608 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1187,7 +1187,7 @@ static void DrawSmallOrderList(const Vehicle *v, int left, int right, int y, Veh VehicleOrderID oid = start; do { - if (oid == v->cur_order_index) DrawString(left, right, y, STR_TINY_RIGHT_ARROW, TC_BLACK); + if (oid == v->cur_real_order_index) DrawString(left, right, y, STR_TINY_RIGHT_ARROW, TC_BLACK); if (order->IsType(OT_GOTO_STATION)) { SetDParam(0, order->GetDestination()); @@ -1294,7 +1294,7 @@ void BaseVehicleListWindow::DrawVehicleListItems(VehicleID selected_vehicle, int DrawString(text_left, text_right, y, STR_TINY_GROUP, TC_BLACK); } - if (show_orderlist) DrawSmallOrderList(v, orderlist_left, orderlist_right, y, v->cur_order_index); + if (show_orderlist) DrawSmallOrderList(v, orderlist_left, orderlist_right, y, v->cur_real_order_index); if (v->IsInDepot()) { str = STR_BLUE_COMMA; |