Improved logic for unit groups identification

This commit is contained in:
Ambroise Garel
2025-07-26 21:49:57 +02:00
parent ac20a2670d
commit fa15f25db6
2 changed files with 74 additions and 6 deletions
@@ -89,8 +89,12 @@ do
}
-- Return exact type when contact is close enough
if distanceToGroup < detectionRange / 2 then
groupInfo.type = Library.objectNames.get(g:getUnit(1))
if gCateg == Group.Category.AIRPLANE or gCateg == Group.Category.HELICOPTER then
if distanceToGroup < detectionRange / 2 then
groupInfo.type = Library.objectNames.get(g:getUnit(1))
else
groupInfo.type = Library.objectNames.getGenericGroup(g)
end
else
groupInfo.type = Library.objectNames.getGenericGroup(g)
end