Many various bugfixes, more aggressive memory optimization
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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()){
|
||||
|
||||
Reference in New Issue
Block a user