From 29cd07d1c06c745251bf779488edb6103c12dfc8 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Fri, 4 Feb 2022 18:20:57 +0000 Subject: [PATCH] Fix aircraft link scale when loading previous savegame versions See: #367 --- src/linkgraph/mcf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/linkgraph/mcf.cpp b/src/linkgraph/mcf.cpp index 8b6123362c..14900ab77d 100644 --- a/src/linkgraph/mcf.cpp +++ b/src/linkgraph/mcf.cpp @@ -312,7 +312,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths) } /* punish in-between stops a little */ uint distance = DistanceMaxPlusManhattan(this->job[from].XY(), this->job[to].XY()) + 1; - if (edge.LastAircraftUpdate() != INVALID_DATE && aircraft_link_scale != 100) { + if (edge.LastAircraftUpdate() != INVALID_DATE && aircraft_link_scale > 100) { distance *= aircraft_link_scale; distance /= 100; }