diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 7ee22b16cf..720ee0d281 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3570,7 +3570,7 @@ void DeleteStaleLinks(Station *from) assert(to->goods[c].node == it->first); ++it; // Do that before removing the edge. Anything else may crash. assert(_date >= edge.LastUpdate()); - uint timeout = LinkGraph::MIN_TIMEOUT_DISTANCE + (DistanceManhattan(from->xy, to->xy) >> 3); + uint timeout = max((LinkGraph::MIN_TIMEOUT_DISTANCE + (DistanceManhattan(from->xy, to->xy) >> 3)) / _settings_game.economy.day_length_factor, 1); if ((uint)(_date - edge.LastUpdate()) > timeout) { /* Have all vehicles refresh their next hops before deciding to * remove the node. */ @@ -3617,7 +3617,7 @@ void DeleteStaleLinks(Station *from) } } assert(_date >= lg->LastCompression()); - if ((uint)(_date - lg->LastCompression()) > LinkGraph::COMPRESSION_INTERVAL) { + if ((uint)(_date - lg->LastCompression()) > max(LinkGraph::COMPRESSION_INTERVAL / _settings_game.economy.day_length_factor, 1)) { lg->Compress(); } }