summaryrefslogtreecommitdiff
path: root/src/timetable_cmd.cpp
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-05-11 09:59:30 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-05-11 09:59:30 +0000
commite673115842d077724c0b532486e176990c7b59d6 (patch)
tree4360ea79a0710429d703a6eb34bd6c0e262a1704 /src/timetable_cmd.cpp
parent5218f18938dcbce6205e913749048ee3d5f46527 (diff)
downloadopenttd-e673115842d077724c0b532486e176990c7b59d6.tar.xz
(svn r26574) -Fix [FS#6006]: Don't reset current order wait time if it's timetabled.
Diffstat (limited to 'src/timetable_cmd.cpp')
-rw-r--r--src/timetable_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp
index d899b7561..c6eaf3da8 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);
}