From 726e1b692060377ce23aff1f3f67a73ffb7dea0d Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sun, 11 May 2014 09:59:30 +0000 Subject: [PATCH] (svn r26574) -Fix [FS#6006]: Don't reset current order wait time if it's timetabled. --- src/timetable_cmd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp index d899b75612..c6eaf3da81 100644 --- a/src/timetable_cmd.cpp +++ b/src/timetable_cmd.cpp @@ -395,7 +395,8 @@ void UpdateVehicleTimetable(Vehicle *v, bool travelling) if (!HasBit(v->vehicle_flags, VF_TIMETABLE_STARTED)) return; bool autofilling = HasBit(v->vehicle_flags, VF_AUTOFILL_TIMETABLE); - if (travelling && !HasBit(v->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) { + if (travelling && (!v->current_order.IsWaitTimetabled() || + (autofilling && !HasBit(v->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)))) { /* Need to clear that now as otherwise we are not able to reduce the wait time */ v->current_order.SetWaitTime(0); }