From b85cbe515e0c73f8894a12e18a12a597d0558844 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 20 Jul 2021 08:49:02 -0400 Subject: [PATCH] Fixed #5621 --- core/src/mindustry/input/MobileInput.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index cc1ced2143..66a52544a7 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -938,7 +938,7 @@ public class MobileInput extends InputHandler implements GestureListener{ }else if(target == null){ player.shooting = false; if(Core.settings.getBool("autotarget") && !(player.unit() instanceof BlockUnitUnit u && u.tile() instanceof ControlBlock c && !c.shouldAutoTarget())){ - target = Units.closestTarget(unit.team, unit.x, unit.y, range, u -> u.team != Team.derelict, u -> u.team != Team.derelict); + target = Units.closestTarget(unit.team, unit.x, unit.y, range, u -> u.checkTarget(type.targetAir, type.targetGround), u -> u.team != Team.derelict && type.targetGround); if(allowHealing && target == null){ target = Geometry.findClosest(unit.x, unit.y, indexer.getDamaged(Team.sharded));