From d2d6fac7df3d3bf5b205fc3dfa90ddffca1fa5bc Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 9 Dec 2023 18:16:29 +0100 Subject: [PATCH] # DETECTION, logic fix --- Moose Development/Moose/Functional/Detection.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/Detection.lua b/Moose Development/Moose/Functional/Detection.lua index 4ddf6ff9c..a33e7f7b0 100644 --- a/Moose Development/Moose/Functional/Detection.lua +++ b/Moose Development/Moose/Functional/Detection.lua @@ -724,6 +724,7 @@ do -- DETECTION_BASE -- Calculate radar blue probability if self.RadarBlur then + BASE:I("RadarBlur") local minheight = self.RadarBlurMinHeight or 250 -- meters local thresheight = self.RadarBlurThresHeight or 90 -- 10% chance to find a low flying group local thresblur = self.RadarBlurThresBlur or 85 -- 25% chance to escape the radar overall @@ -732,8 +733,11 @@ do -- DETECTION_BASE local unit = UNIT:FindByName(DetectedObjectName) if unit and unit:IsAlive() then local AGL = unit:GetAltitude(true) - if AGL <= minheight and fheight < thresheight then DetectionAccepted = false end + BASE:I("Unit "..DetectedObjectName.." is at "..AGL.."m.") + BASE:I(string.format("fheight = %d/%d | fblur = %d/%d",fheight,thresheight,fblur,thresblur)) if fblur > thresblur then DetectionAccepted = false end + if AGL <= minheight and fheight < thresheight then DetectionAccepted = false end + BASE:I("Detection Accepted = "..tostring(DetectionAccepted)) end end