Misc bug/crash fixes
This commit is contained in:
@@ -21,7 +21,7 @@ import java.io.IOException;
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
public class WaveSpawner{
|
||||
private static final int quadsize = 4;
|
||||
private static final int quadsize = 6;
|
||||
|
||||
private GridBits quadrants;
|
||||
|
||||
@@ -164,7 +164,7 @@ public class WaveSpawner{
|
||||
for(int y = quady * quadsize; y < world.height() && y < (quady + 1) * quadsize; y++){
|
||||
Tile tile = world.tile(x, y);
|
||||
|
||||
if(tile == null || tile.solid() || world.pathfinder.getValueforTeam(Team.red, x, y) == Float.MAX_VALUE){
|
||||
if(tile == null || tile.solid() || world.pathfinder.getValueforTeam(Team.red, x, y) == Float.MAX_VALUE || tile.floor().isLiquid){
|
||||
setQuad(quadx, quady, false);
|
||||
break outer;
|
||||
}
|
||||
@@ -217,8 +217,8 @@ public class WaveSpawner{
|
||||
|
||||
//TODO instead of randomly scattering locations around the map, find spawns close to each other
|
||||
private void findLocation(GroundSpawn spawn){
|
||||
spawn.x = -1;
|
||||
spawn.y = -1;
|
||||
spawn.x = Mathf.random(quadWidth()-1);
|
||||
spawn.y = Mathf.random(quadHeight()-1);
|
||||
|
||||
int shellWidth = quadWidth() * 2 + quadHeight() * 2 * 6;
|
||||
shellWidth = Math.min(quadWidth() * quadHeight() / 4, shellWidth);
|
||||
|
||||
Reference in New Issue
Block a user