Fixed old pathfinding targets not resetting on death

This commit is contained in:
Anuken
2019-06-08 13:04:26 -04:00
parent 01a9be835f
commit 6226e0c5a3

View File

@@ -98,7 +98,10 @@ public class Pathfinder{
if(paths != null && paths[team.ordinal()] != null && paths[team.ordinal()].weights != null){
PathData path = paths[team.ordinal()];
if(!path.frontier.isEmpty()){
if(path.weights[tile.x][tile.y] <= 0.1f){
//this was a previous target
path.frontier.clear();
}else if(!path.frontier.isEmpty()){
return;
}