Many various bugfixes, more aggressive memory optimization

This commit is contained in:
Anuken
2018-06-26 11:15:23 -04:00
parent 8ec9d95cd2
commit 7a049d64d8
39 changed files with 189 additions and 87 deletions

View File

@@ -73,8 +73,8 @@ public class BlockIndexer {
ores = null;
//create bitset for each team type that contains each quadrant
structQuadrants = new Bits[Team.values().length];
for(int i = 0; i < Team.values().length; i ++){
structQuadrants = new Bits[Team.all.length];
for(int i = 0; i < Team.all.length; i ++){
structQuadrants[i] = new Bits(Mathf.ceil(world.width() / (float)structQuadrantSize) * Mathf.ceil(world.height() / (float)structQuadrantSize));
}

View File

@@ -116,7 +116,7 @@ public class Pathfinder {
private void createFor(Team team){
PathData path = new PathData();
path.search ++;
path.frontier.ensureCapacity(world.width() * world.height() / 2);
path.frontier.ensureCapacity((world.width() + world.height()) * 3);
paths[team.ordinal()] = path;
@@ -167,7 +167,7 @@ public class Pathfinder {
private void clear(){
Timers.mark();
paths = new PathData[Team.values().length];
paths = new PathData[Team.all.length];
blocked.clear();
for(TeamData data : state.teams.getTeams()){