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);