Merge pull request #11171 from clementcontet/patch-1

Compute obstaclesTime before adding final segment
This commit is contained in:
Vitaliy 2021-03-21 14:58:51 +02:00 committed by GitHub
commit 1ee2d1cc12
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;