Add setting to increase cost/distance of aircraft linkgraph links

This commit is contained in:
Jonathan G Rennison
2022-01-02 01:15:54 +00:00
parent ba97d0a827
commit 89181ea9fd
15 changed files with 56 additions and 5 deletions

View File

@@ -4124,6 +4124,9 @@ void DeleteStaleLinks(Station *from)
++it; // Do that before removing the edge. Anything else may crash.
assert(_date >= edge.LastUpdate());
uint timeout = std::max<uint>((LinkGraph::MIN_TIMEOUT_DISTANCE + (DistanceManhattan(from->xy, to->xy) >> 3)) / _settings_game.economy.day_length_factor, 1);
if (edge.LastAircraftUpdate() != INVALID_DATE && (uint)(_date - edge.LastAircraftUpdate()) > timeout) {
edge.ClearAircraft();
}
if ((uint)(_date - edge.LastUpdate()) > timeout) {
bool updated = false;