Skip to content

Commit

Permalink
Fix #9708: [Linkgraph] Don't assume vehicles have a non-zero max speed
Browse files Browse the repository at this point in the history
  • Loading branch information
nchappe authored and michicc committed Oct 29, 2022
1 parent f8a7b76 commit 8bf56f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/linkgraph/refresh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ void LinkRefresher::RefreshStats(const Order *cur, const Order *next)
uint cargo_quantity = this->capacities[c];
if (cargo_quantity == 0) continue;

if (this->vehicle->GetDisplayMaxSpeed() == 0) continue;

/* If not allowed to merge link graphs, make sure the stations are
* already in the same link graph. */
if (!this->allow_merge && st->goods[c].link_graph != st_to->goods[c].link_graph) {
Expand Down

0 comments on commit 8bf56f3

Please sign in to comment.