Fix #9665: [Linkgraph] Fix travel times of non-direct journeys

This commit is contained in:
Nicolas Chappe
2021-11-13 20:09:05 +01:00
committed by Michael Lutz
parent c5369caa45
commit f8a7b76675
5 changed files with 12 additions and 1 deletions

View File

@@ -3148,6 +3148,13 @@ bool AfterLoadGame()
}
}
/* Use current order time to approximate last loading time */
if (IsSavegameVersionBefore(SLV_LAST_LOADING_TICK)) {
for (Vehicle *v : Vehicle::Iterate()) {
v->last_loading_tick = std::max(_tick_counter, static_cast<uint64>(v->current_order_time)) - v->current_order_time;
}
}
/* Compute station catchment areas. This is needed here in case UpdateStationAcceptance is called below. */
Station::RecomputeCatchmentForAll();