Fixes incorrect link graph edge travel times with non-unity day length
Change vehicle last_loading_tick to be relative to _scaled_tick_counter
This commit is contained in:
@@ -169,6 +169,9 @@ class NIHVehicle : public NIHelper {
|
||||
if (BaseStation::IsValidID(v->last_loading_station)) {
|
||||
seprintf(buffer, lastof(buffer), " V Last loading station: %u, %s", v->last_loading_station, BaseStation::Get(v->last_loading_station)->GetCachedName());
|
||||
output.print(buffer);
|
||||
seprintf(buffer, lastof(buffer), " V Last loading tick: " OTTD_PRINTF64 " (" OTTD_PRINTF64 ", " OTTD_PRINTF64 " mins ago)",
|
||||
v->last_loading_tick, _scaled_tick_counter - v->last_loading_tick, (_scaled_tick_counter - v->last_loading_tick) / _settings_time.ticks_per_minute);
|
||||
output.print(buffer);
|
||||
}
|
||||
if (v->IsGroundVehicle()) {
|
||||
const GroundVehicleCache &gvc = *(v->GetGroundVehicleCache());
|
||||
|
Reference in New Issue
Block a user