Fix aircraft link scale when loading previous savegame versions
See: #367
This commit is contained in:
@@ -312,7 +312,7 @@ void MultiCommodityFlow::Dijkstra(NodeID source_node, PathVector &paths)
|
|||||||
}
|
}
|
||||||
/* punish in-between stops a little */
|
/* punish in-between stops a little */
|
||||||
uint distance = DistanceMaxPlusManhattan(this->job[from].XY(), this->job[to].XY()) + 1;
|
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 *= aircraft_link_scale;
|
||||||
distance /= 100;
|
distance /= 100;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user