javascript-astar
javascript-astar copied to clipboard
Can't find a path after a few search
currentNode.closed = true and didn't make it dirty so that when a new search begins, the function Graph.cleanDirty() may not reset the closed node, and finally it will result in no valid path
do a search and choose a nearby node for new target can easily reproduce it.
I added graph.makeDirty(currentNode) to fix it, but I didn't test it for a full round
+1
+1
I figured out that bug I think. The "closed" nodes aren't getting cleaned properly between searches. Look here for a fix:
https://github.com/bgrins/javascript-astar/issues/52