Fixed old pathfinding targets not resetting on death
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user