mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-11 15:48:07 +07:00
Fixed ground units walking into exclusion zone
This commit is contained in:
parent
b207d05d4b
commit
77911385e1
@ -25,7 +25,14 @@ public class GroundAI extends AIController{
|
||||
}
|
||||
|
||||
if((core == null || !unit.within(core, unit.range() * 0.5f)) && command() == UnitCommand.attack){
|
||||
moveToCore(FlagTarget.enemyCores);
|
||||
boolean move = true;
|
||||
|
||||
if(state.rules.waves && unit.team == state.rules.defaultTeam){
|
||||
Tile spawner = getClosestSpawner();
|
||||
if(spawner != null && unit.within(spawner, state.rules.dropZoneRadius + 120f)) move = false;
|
||||
}
|
||||
|
||||
if(move) moveToCore(FlagTarget.enemyCores);
|
||||
}
|
||||
|
||||
if(command() == UnitCommand.rally){
|
||||
|
Loading…
Reference in New Issue
Block a user