Fixed incorrect condition

This commit is contained in:
Anuken
2025-04-17 16:31:01 -04:00
parent 264d13f827
commit 151930de6d

View File

@@ -1063,7 +1063,7 @@ public class MobileInput extends InputHandler implements GestureListener{
player.shooting = false;
if(Core.settings.getBool("autotarget") && !(player.unit() instanceof BlockUnitUnit u && u.tile() instanceof ControlBlock c && !c.shouldAutoTarget())){
if(unit.type.canAttack){
target = Units.closestTarget(unit.team, unit.x, unit.y, range, u -> u.checkTarget(type.targetAir, type.targetGround), u -> type.targetGround && !type.targetBuildingsMobile);
target = Units.closestTarget(unit.team, unit.x, unit.y, range, u -> u.checkTarget(type.targetAir, type.targetGround), u -> type.targetGround && type.targetBuildingsMobile);
}
if(allowHealing && target == null){