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:
DarkGuardsman 2013-07-29 06:32:34 -04:00
parent 69ffac2070
commit 279ede1fb2

View file

@ -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())