From f2c476a71640cbbac4ba14c4c9edb37112ef219a Mon Sep 17 00:00:00 2001 From: MinRi2 <85016284+MinRi2@users.noreply.github.com> Date: Sun, 13 Aug 2023 22:18:06 +0800 Subject: [PATCH] Fixed: Units lose LogicAI after reading. (#8920) --- core/src/mindustry/ai/types/LogicAI.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/mindustry/ai/types/LogicAI.java b/core/src/mindustry/ai/types/LogicAI.java index 5987dc2bc7..8cd8eec938 100644 --- a/core/src/mindustry/ai/types/LogicAI.java +++ b/core/src/mindustry/ai/types/LogicAI.java @@ -40,6 +40,12 @@ public class LogicAI extends AIController{ private float lastMoveX, lastMoveY; private int lastPathId = 0; + // LogicAI state should not be reset after reading. + @Override + public boolean keepState(){ + return true; + } + @Override public void updateMovement(){ if(control == LUnitControl.pathfind){