Aircraft types now identified no matter the distance

This commit is contained in:
Ambroise Garel
2025-07-27 19:47:21 +02:00
parent 11835d9c0b
commit 34d54e8f76
@@ -86,13 +86,12 @@ do
type = "contact" type = "contact"
} }
-- Return exact type when aircraft contact is close enough
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 -- if distanceToGroup < detectionRange / 2 then
groupInfo.type = Library.objectNames.get(g:getUnit(1)) groupInfo.type = Library.objectNames.get(g:getUnit(1))
else -- else
groupInfo.type = Library.objectNames.getGenericGroup(g) -- groupInfo.type = Library.objectNames.getGenericGroup(g)
end -- end
else else
groupInfo.type = Library.objectNames.getGenericGroup(g) groupInfo.type = Library.objectNames.getGenericGroup(g)
end end