Fixed some multithreading bugs / No more drift

This commit is contained in:
Anuken
2018-09-09 11:26:15 -04:00
parent 1651844b4f
commit 62f2c67321
9 changed files with 12 additions and 24 deletions
@@ -83,7 +83,7 @@ public class Pathfinder{
}
public float getValueforTeam(Team team, int x, int y){
return paths == null ? 0 : paths[team.ordinal()].weights[x][y];
return paths == null || team.ordinal() >= paths.length ? 0 : paths[team.ordinal()].weights[x][y];
}
private boolean passable(Tile tile, Team team){