diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java index 0c447be793..2b26566cf0 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutePlanner.java @@ -67,7 +67,7 @@ public class TransportRoutePlanner { ctx.visitedRoutesCount++; ctx.visitedSegments.put(segment.getId(), segment); - if (segment.getDepth() > ctx.cfg.maxNumberOfChanges) { + if (segment.getDepth() > ctx.cfg.maxNumberOfChanges + 1) { continue; } if (segment.distFromStart > finishTime + ctx.cfg.finishTimeSeconds || diff --git a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java index 4c71e5307f..a5c3f7bae9 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/TransportRoutingConfiguration.java @@ -18,7 +18,7 @@ public class TransportRoutingConfiguration { public int walkChangeRadius = 300; - public int maxNumberOfChanges = 4; + public int maxNumberOfChanges = 3; public int finishTimeSeconds = 1200;