From e06478d4fe94e6b4af55dccd5e7d2ecae58b3806 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Sun, 21 Mar 2021 15:25:45 +0200 Subject: [PATCH] Revert "Compute obstaclesTime before adding final segment" --- .../src/main/java/net/osmand/router/BinaryRoutePlanner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java index 4c85058fa3..0769e1390c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java +++ b/OsmAnd-java/src/main/java/net/osmand/router/BinaryRoutePlanner.java @@ -457,10 +457,10 @@ public class BinaryRoutePlanner { directionAllowed = false; continue; } - obstaclesTime += obstacle; - obstaclesTime += heightObstacle; boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments, segmentPoint, segmentDist, obstaclesTime); + obstaclesTime += obstacle; + obstaclesTime += heightObstacle; if (alreadyVisited) { directionAllowed = false; continue;