Bugfixes, cleanup, optimization

This commit is contained in:
Anuken
2018-06-02 21:45:07 -04:00
parent ae6b4211b9
commit 9555b10b97
47 changed files with 369 additions and 299 deletions
@@ -3,6 +3,7 @@ package io.anuke.mindustry.ai;
import com.badlogic.gdx.math.GridPoint2;
import com.badlogic.gdx.utils.IntArray;
import com.badlogic.gdx.utils.ObjectSet;
import com.badlogic.gdx.utils.ObjectSet.ObjectSetIterator;
import com.badlogic.gdx.utils.Queue;
import com.badlogic.gdx.utils.TimeUtils;
import io.anuke.mindustry.game.EventType.TileChangeEvent;
@@ -39,7 +40,9 @@ public class Pathfinder {
}
public void update(){
for(TeamData team : state.teams.getTeams()){
ObjectSetIterator<TeamData> iterator = new ObjectSetIterator<>(state.teams.getTeams());
for(TeamData team : iterator){
updateFrontier(team.team, maxUpdate);
}
}