"Fixed" some bugs

This commit is contained in:
Anuken
2018-10-11 10:01:19 -04:00
parent 52bd079c0a
commit 22328772ca
2 changed files with 2 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ public class WaveSpawner{
int addGround = groundGroups - groundSpawns.size, addFly = flyGroups - flySpawns.size; int addGround = groundGroups - groundSpawns.size, addFly = flyGroups - flySpawns.size;
//add extra groups if the total exceeds it //add extra groups if the total exceeds it
if(!dynamicSpawn){ if(dynamicSpawn){
for(int i = 0; i < addGround; i++){ for(int i = 0; i < addGround; i++){
GroundSpawn spawn = new GroundSpawn(); GroundSpawn spawn = new GroundSpawn();
findLocation(spawn); findLocation(spawn);

View File

@@ -331,6 +331,7 @@ public abstract class InputHandler extends InputAdapter{
for(Tile tile : state.teams.get(player.getTeam()).cores){ for(Tile tile : state.teams.get(player.getTeam()).cores){
if(tile.distanceTo(x * tilesize, y * tilesize) < coreBuildRange){ if(tile.distanceTo(x * tilesize, y * tilesize) < coreBuildRange){
//TODO terrible hack //TODO terrible hack
//this might actually screw things up on the logic thread.
try{ try{
return Build.validPlace(player.getTeam(), x, y, type, rotation) && return Build.validPlace(player.getTeam(), x, y, type, rotation) &&
Vector2.dst(player.x, player.y, x * tilesize, y * tilesize) < Player.placeDistance; Vector2.dst(player.x, player.y, x * tilesize, y * tilesize) < Player.placeDistance;