Disable naval units on ground / Mobile payload input

This commit is contained in:
Anuken
2020-08-17 16:15:51 -04:00
parent 9a48028508
commit 7ecf5aa26d
11 changed files with 83 additions and 32 deletions

View File

@@ -26,20 +26,13 @@ public class GroundAI extends AIController{
}
}
boolean rotate = false, shoot = false;
if(!Units.invalidateTarget(target, unit, unit.range())){
rotate = true;
shoot = unit.within(target, unit.range());
if(unit.type().hasWeapons()){
unit.aimLook(Predict.intercept(unit, target, unit.type().weapons.first().bullet.speed));
}
}else if(unit.moving()){
unit.lookAt(unit.vel().angle());
}
unit.controlWeapons(rotate, shoot);
}
protected void moveToCore(FlagTarget path){