From 10554ceb5ab21f2661930b6a2a77b07bbb2cedc0 Mon Sep 17 00:00:00 2001 From: Architector #4 Date: Sun, 7 Dec 2025 08:04:43 +0300 Subject: [PATCH] Native*AI - Don't consider legless creatures as always in-flight Flight status is already reasonably handled by self.groundContact logic. This patch fixes their ability to actually complete pathfinding. --- Data/Base.rte/AI/NativeCrabAI.lua | 9 +-------- Data/Base.rte/AI/NativeHumanAI.lua | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Data/Base.rte/AI/NativeCrabAI.lua b/Data/Base.rte/AI/NativeCrabAI.lua index 075c9b7852..56ea852cfa 100644 --- a/Data/Base.rte/AI/NativeCrabAI.lua +++ b/Data/Base.rte/AI/NativeCrabAI.lua @@ -321,14 +321,7 @@ function NativeCrabAI:Update(Owner) end end - local newFlying = false; - if not (Owner.LeftFGLeg and Owner.RightFGLeg and Owner.LeftBGLeg and Owner.RightBGLeg) then - newFlying = true; - end - - if self.groundContact < 0 then - newFlying = true; - end + local newFlying = self.groundContact < 0; if self.flying ~= newFlying then Owner:SendMessage("AI_IsFlying", newFlying); diff --git a/Data/Base.rte/AI/NativeHumanAI.lua b/Data/Base.rte/AI/NativeHumanAI.lua index 1e782b3ee5..d5bd291045 100644 --- a/Data/Base.rte/AI/NativeHumanAI.lua +++ b/Data/Base.rte/AI/NativeHumanAI.lua @@ -260,14 +260,7 @@ function NativeHumanAI:Update(Owner) end end - local newFlying = false; - if not (Owner.FGLeg and Owner.BGLeg) then - newFlying = true; - end - - if self.groundContact < 0 then - newFlying = true; - end + local newFlying = self.groundContact < 0; if self.flying ~= newFlying then Owner:SendMessage("AI_IsFlying", newFlying);