mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-08 09:54:33 +07:00
Disable RTS AI for naval units
This commit is contained in:
parent
5d4015387e
commit
e21cac75b5
@ -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 ひどい
|
||||
|
Loading…
Reference in New Issue
Block a user