mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 17:19:09 +00:00
(svn r13704) -Fix: make timetables work more sensible when used in conjunction with conditional orders, i.e. make it possibly to tell how long to travel to the next destination if you jump.
This commit is contained in:
@@ -1694,10 +1694,12 @@ static bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_dept
|
||||
|
||||
case OT_CONDITIONAL: {
|
||||
VehicleOrderID next_order = ProcessConditionalOrder(order, v);
|
||||
UpdateVehicleTimetable(v, true);
|
||||
if (next_order != INVALID_VEH_ORDER_ID) {
|
||||
UpdateVehicleTimetable(v, false);
|
||||
v->cur_order_index = next_order;
|
||||
v->current_order_time += GetVehicleOrder(v, next_order)->travel_time;
|
||||
} else {
|
||||
UpdateVehicleTimetable(v, true);
|
||||
v->cur_order_index++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user