Refined contact type identification

This commit is contained in:
Ambroise Garel 2025-07-25 18:09:43 +02:00
parent 3c72fbd96d
commit c2ed114217

View File

@ -161,9 +161,16 @@ do
type = "unknown" type = "unknown"
} }
groupInfo.type = Library.objectNames.getGenericGroup(g, distanceToGroup > detectionRange / 2) if gCateg == Group.Category.AIRPLANE or gCateg == Group.Category.HELICOPTER then
-- if gCateg == Group.Category.AIRPLANE or gCateg == Group.Category.HELICOPTER then if distanceToGroup < detectionRange / 2 then -- Return exact type when aircraft is close enough
-- end groupInfo.type = Library.objectNames.get(g:getUnit(1))
else
groupInfo.type = Library.objectNames.getGenericGroup(g)
end
else
-- If above 2/3 max detection distance, return imprecise name ("vehicle" instead of "AAA"/"tank"/etc)
groupInfo.type = Library.objectNames.getGenericGroup(g, distanceToGroup > 2 * detectionRange / 3)
end
if not newContactsOnly or newGroup then if not newContactsOnly or newGroup then
table.insert(detectedTargets, groupInfo) table.insert(detectedTargets, groupInfo)