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 pull[bot] committed Oct 4, 2023
1 parent ed62a28 commit 1384648
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/linkgraph/refresh.cpp
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 1384648

Please sign in to comment.