Fixed a few more crashes

This commit is contained in:
Anuken
2018-02-23 15:01:32 -05:00
parent a6737c5a54
commit 2adacccf7d
3 changed files with 6 additions and 7 deletions

View File

@@ -88,7 +88,8 @@ public abstract class InputHandler extends InputAdapter{
public boolean validPlace(int x, int y, Block type){
for(SpawnPoint spawn : world.getSpawns()){
for(int i = 0; i < world.getSpawns().size; i ++){
SpawnPoint spawn = world.getSpawns().get(i);
if(Vector2.dst(x * tilesize, y * tilesize, spawn.start.worldx(), spawn.start.worldy()) < enemyspawnspace){
return false;
}