1
0
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:
rubidium
2008-07-14 21:01:49 +00:00
parent 797ccc8b49
commit 0f4d9a8e49
5 changed files with 32 additions and 16 deletions

View File

@@ -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++;
}