This commit is contained in:
Anuken
2022-02-07 16:09:15 -05:00
parent 77410ce106
commit c5bffd887e
5 changed files with 17 additions and 5 deletions

View File

@@ -34,6 +34,7 @@ public class AIController implements UnitController{
@Override
public void updateUnit(){
if(disabled()){
stopShooting();
return;
}
@@ -49,6 +50,13 @@ public class AIController implements UnitController{
updateMovement();
}
public void stopShooting(){
for(var mount : unit.mounts){
//ignore mount controllable stats too, they should not shoot either
mount.shoot = false;
}
}
public boolean disabled(){
return !unit.team.isAI() && !unit.type.defaultAI;
}