Schedule dispatch: Warn about and ignore departure slots outside the duration

This commit is contained in:
Jonathan G Rennison
2020-02-09 23:17:19 +00:00
parent babe98cdb1
commit bca0187aaf
4 changed files with 44 additions and 0 deletions

View File

@@ -106,6 +106,7 @@ static inline bool VehicleSetNextDepartureTime(DateTicks *previous_departure, ui
/* Find next available slots */
for (auto current_offset : v->orders.list->GetScheduledDispatch()) {
if (current_offset >= dispatch_duration) continue;
DateTicksScaled current_departure = begin_time + current_offset;
while (current_departure <= earliest_departure) {
current_departure += dispatch_duration;