diff --git a/src/core/game/RailNetworkImpl.ts b/src/core/game/RailNetworkImpl.ts index 43bb8f1d8a..af8523b59e 100644 --- a/src/core/game/RailNetworkImpl.ts +++ b/src/core/game/RailNetworkImpl.ts @@ -265,7 +265,7 @@ export class RailNetworkImpl implements RailNetwork { for (const neighbor of neighbors) { // Limit to the closest 5 stations to avoid running too many pathfinding calls. if (paths.length >= 5) break; - if (neighbor.distSquared <= minRangeSquared) continue; + if (neighbor.distSquared < minRangeSquared) continue; const neighborStation = this._stationManager.findStation(neighbor.unit); if (!neighborStation) continue; @@ -318,7 +318,7 @@ export class RailNetworkImpl implements RailNetwork { distanceToStation === -1; if ( connectionAvailable && - neighbor.distSquared > this.game.config().trainStationMinRange() ** 2 + neighbor.distSquared >= this.game.config().trainStationMinRange() ** 2 ) { if (this.connect(station, neighborStation)) { neighborCluster.addStation(station);