Fixed air units spawning on wrong end of map / Fixed kick message spam

This commit is contained in:
Anuken
2020-08-25 14:38:07 -04:00
parent 8143b8d80a
commit ea9ebe26a3
2 changed files with 8 additions and 1 deletions

View File

@@ -99,7 +99,7 @@ public class WaveSpawner{
private void eachFlyerSpawn(Floatc2 cons){
for(Tile tile : spawns){
float angle = Angles.angle(tile.x, tile.y, world.width() / 2, world.height() / 2);
float angle = Angles.angle(world.width() / 2, world.height() / 2, tile.x, tile.y);
float trns = Math.max(world.width(), world.height()) * Mathf.sqrt2 * tilesize;
float spawnX = Mathf.clamp(world.width() * tilesize / 2f + Angles.trnsx(angle, trns), -margin, world.width() * tilesize + margin);