better check

This commit is contained in:
Leijurv 2019-02-07 16:12:34 -08:00
parent 67fa91abe8
commit 42513e4b56
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -441,7 +441,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
Optional<PathExecutor> executor = calcResult.getPath().map(p -> new PathExecutor(PathingBehavior.this, p));
if (current == null) {
if (executor.isPresent()) {
if (executor.get().getPath().getSrc().equals(expectedSegmentStart)) {
if (executor.get().getPath().positions().contains(expectedSegmentStart)) {
queuePathEvent(PathEvent.CALC_FINISHED_NOW_EXECUTING);
current = executor.get();
} else {