Disable RTS AI for naval units

This commit is contained in:
Anuken 2022-09-26 21:22:03 -04:00
parent 5d4015387e
commit e21cac75b5

View File

@ -67,6 +67,15 @@ public class CommandAI extends AIController{
return;
}
//acquiring naval targets isn't supported yet, so use the fallback dumb AI
if(unit.team.isAI() && unit.team.rules().rtsAi && unit.type.naval){
if(fallback == null) fallback = new GroundAI();
if(fallback.unit() != unit) fallback.unit(unit);
fallback.updateUnit();
return;
}
updateVisuals();
//only autotarget if the unit supports it
if(targetPos == null || unit.type.autoFindTarget){
@ -227,6 +236,8 @@ public class CommandAI extends AIController{
pathId = Vars.controlPath.nextTargetId();
}
/*
//TODO ひどい