Launch/map buttons for mobile campaign / Bugfixes

This commit is contained in:
Anuken
2020-08-27 11:35:58 -04:00
parent 89c007fcdb
commit b7ec90e7c0
8 changed files with 36 additions and 13 deletions

View File

@@ -9,6 +9,8 @@ import mindustry.gen.*;
import mindustry.world.*;
import mindustry.world.meta.*;
import java.util.*;
import static mindustry.Vars.*;
public class GroundAI extends AIController{
@@ -20,8 +22,9 @@ public class GroundAI extends AIController{
Building core = unit.closestEnemyCore();
if(core != null && unit.within(core, unit.range() / 1.1f)){
if(core != null && unit.within(core, unit.range() / 1.1f + core.block.size * tilesize / 2f)){
target = core;
Arrays.fill(targets, core);
}
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){