diff --git a/src/departures.cpp b/src/departures.cpp index 6cf2acb5d29..ae93b8530ac 100644 --- a/src/departures.cpp +++ b/src/departures.cpp @@ -1420,6 +1420,11 @@ void DepartureListScheduleModeSlotEvaluator::EvaluateSlotIndex(uint slot_index) /* Loop through the vehicle's orders until we've found a suitable order or we've determined that no such order exists. */ /* We only need to consider each order at most once. */ for (int i = this->v->GetNumOrders(); i > 0; --i) { + /* If an order has a 0 travel time, and it's not explictly set, then stop. */ + if (require_travel_time && order->GetTravelTime() == 0 && !order->IsTravelTimetabled() && !order->IsType(OT_IMPLICIT) && !order->IsType(OT_CONDITIONAL)) { + break; + } + departure_tick += order->GetTravelTime(); if (type == D_ARRIVAL && this->calling_settings.IsArrival(order, this->source)) { @@ -1481,11 +1486,6 @@ void DepartureListScheduleModeSlotEvaluator::EvaluateSlotIndex(uint slot_index) break; } - /* If an order has a 0 travel time, and it's not explictly set, then stop. */ - if (require_travel_time && order->GetTravelTime() == 0 && !order->IsTravelTimetabled() && !order->IsType(OT_IMPLICIT)) { - break; - } - if (type == D_ARRIVAL) { this->arrival_history.push_back({ order, (departure_tick - this->slot).AsTicks() }); }