Compute obstaclesTime before adding final segment

Fix https://github.com/osmandapp/OsmAnd/issues/10867
This commit is contained in:
clementcontet 2021-03-16 17:49:57 +01:00 committed by GitHub
parent 49aab1eb21
commit eab60bed46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -457,10 +457,10 @@ public class BinaryRoutePlanner {
directionAllowed = false;
continue;
}
boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments,
segmentPoint, segmentDist, obstaclesTime);
obstaclesTime += obstacle;
obstaclesTime += heightObstacle;
boolean alreadyVisited = checkIfOppositeSegmentWasVisited(ctx, reverseWaySearch, graphSegments, segment, oppositeSegments,
segmentPoint, segmentDist, obstaclesTime);
if (alreadyVisited) {
directionAllowed = false;
continue;