From 607ca904694e1eaf532056ed0875cf280b6cb95b Mon Sep 17 00:00:00 2001 From: Ambroise Garel <47314805+akaAgar@users.noreply.github.com> Date: Fri, 25 Jul 2025 19:39:16 +0200 Subject: [PATCH] Target identification distance more realistic --- Script/The Universal Mission/Wingmen.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Script/The Universal Mission/Wingmen.lua b/Script/The Universal Mission/Wingmen.lua index d3576c9..7dad72c 100644 --- a/Script/The Universal Mission/Wingmen.lua +++ b/Script/The Universal Mission/Wingmen.lua @@ -164,8 +164,13 @@ do groupInfo.type = Library.objectNames.getGenericGroup(g) end else - --groupInfo.type = Library.objectNames.getGenericGroup(g, distanceToGroup > 2 * detectionRange / 3) -- If above 2/3 max detection distance, return imprecise name ("vehicle" instead of "AAA"/"tank"/etc) - groupInfo.type = Library.objectNames.getGenericGroup(g) + if distanceToGroup > 2 * detectionRange / 3 then + groupInfo.type = Library.objectNames.getGenericGroup(g, true) + elseif distanceToGroup > detectionRange / 3 then + groupInfo.type = Library.objectNames.getGenericGroup(g, false) + else + groupInfo.type = Library.objectNames.get(g:getUnit(1)) + end end table.insert(detectedTargets, groupInfo)