Fixed an issue with refresh on pathfinder
if a node become a result its was not being added to the result list if the path finder was not cleared first. In most cases clearing the path finder is not as effective as refreshing the nodes.
This commit is contained in:
parent
69ffac2070
commit
279ede1fb2
1 changed files with 6 additions and 1 deletions
|
@ -205,10 +205,15 @@ public class LiquidPathFinder
|
|||
Iterator<Vector3> it = this.nodes.iterator();
|
||||
while (it.hasNext())
|
||||
{
|
||||
if (!this.isValidNode(it.next()))
|
||||
Vector3 vec = it.next();
|
||||
if (!this.isValidNode(vec))
|
||||
{
|
||||
it.remove();
|
||||
}
|
||||
if(this.isValidResult(vec))
|
||||
{
|
||||
this.results.add(vec);
|
||||
}
|
||||
}
|
||||
it = this.results.iterator();
|
||||
while (it.hasNext())
|
||||
|
|
Loading…
Reference in a new issue