From a8d750efce69699355ed1b38c569ee435fee00c5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 9 Feb 2022 17:23:57 -0500 Subject: [PATCH] Fixed control --- core/src/mindustry/ai/types/CommandAI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/ai/types/CommandAI.java b/core/src/mindustry/ai/types/CommandAI.java index bcfe25fc16..ab7492ec59 100644 --- a/core/src/mindustry/ai/types/CommandAI.java +++ b/core/src/mindustry/ai/types/CommandAI.java @@ -21,7 +21,7 @@ public class CommandAI extends AIController{ updateVisuals(); updateTargeting(); - if(invalid(attackTarget)){ + if(attackTarget != null && invalid(attackTarget)){ attackTarget = null; targetPos = null; }