Fix aircraft link scale when loading previous savegame versions

See: #367
This commit is contained in:
Jonathan G Rennison
2022-02-04 18:20:57 +00:00
parent 32dc06a428
commit 29cd07d1c0

View File

@@ -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;
}