improve pathingbehavior resiliency
This commit is contained in:
parent
a8404a7286
commit
043d6ffd20
@ -470,7 +470,9 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
|||||||
queuePathEvent(PathEvent.NEXT_CALC_FAILED);
|
queuePathEvent(PathEvent.NEXT_CALC_FAILED);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalStateException("I have no idea what to do with this path");
|
//throw new IllegalStateException("I have no idea what to do with this path");
|
||||||
|
// no point in throwing an exception here, and it gets it stuck with inProgress being not null
|
||||||
|
logDirect("Warning: PathingBehaivor illegal state! Discarding invalid path!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (talkAboutIt && current != null && current.getPath() != null) {
|
if (talkAboutIt && current != null && current.getPath() != null) {
|
||||||
|
@ -86,7 +86,7 @@ public abstract class AbstractNodeCostSearch implements IPathFinder {
|
|||||||
@Override
|
@Override
|
||||||
public synchronized PathCalculationResult calculate(long primaryTimeout, long failureTimeout) {
|
public synchronized PathCalculationResult calculate(long primaryTimeout, long failureTimeout) {
|
||||||
if (isFinished) {
|
if (isFinished) {
|
||||||
throw new IllegalStateException("Path Finder is currently in use, and cannot be reused!");
|
throw new IllegalStateException("Path finder cannot be reused!");
|
||||||
}
|
}
|
||||||
cancelRequested = false;
|
cancelRequested = false;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user