Test fixes

This commit is contained in:
Anuken
2019-04-07 14:53:53 -04:00
parent 9699d9467a
commit 7dfb0a81e3
5 changed files with 15 additions and 7 deletions

View File

@@ -261,6 +261,8 @@ public class BlockIndexer{
}
private void updateQuadrant(Tile tile){
if(structQuadrants == null) return;
//this quadrant is now 'dirty', re-scan the whole thing
int quadrantX = tile.x / structQuadrantSize;
int quadrantY = tile.y / structQuadrantSize;

View File

@@ -90,7 +90,7 @@ public class Pathfinder{
* This only occurs for active teams.*/
private void update(Tile tile, Team team){
//make sure team exists
if(paths[team.ordinal()] != null && paths[team.ordinal()].weights != null){
if(paths != null && paths[team.ordinal()] != null && paths[team.ordinal()].weights != null){
PathData path = paths[team.ordinal()];
//impassable tiles have a weight of float.max

View File

@@ -5,8 +5,7 @@ import io.anuke.arc.collection.Array;
import io.anuke.arc.collection.IntArray;
import io.anuke.arc.math.Angles;
import io.anuke.arc.math.Mathf;
import io.anuke.arc.util.Time;
import io.anuke.arc.util.Tmp;
import io.anuke.arc.util.*;
import io.anuke.mindustry.content.Blocks;
import io.anuke.mindustry.content.Fx;
import io.anuke.mindustry.entities.Damage;
@@ -120,11 +119,13 @@ public class WaveSpawner{
for(int x = 0; x < world.width(); x++){
for(int y = 0; y < world.height(); y++){
if(world.tile(x, y).block() == Blocks.spawn){
addSpawns(x, y);
//hide spawnpoints, they have served their purpose
world.tile(x, y).setBlock(Blocks.air);
Log.info("Add spawn "+ x + " " + y);
}
}
}