mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Refined contact type identification
This commit is contained in:
parent
3c72fbd96d
commit
c2ed114217
@ -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)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user