mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
INTEL - also set isship and isground attributes on contacts
This commit is contained in:
parent
53e98e70aa
commit
17ba35e237
@ -748,6 +748,8 @@ function INTEL:CreateDetectedItems(DetectedGroups, RecceDetecting)
|
||||
item.velocity=group:GetVelocityVec3()
|
||||
item.speed=group:GetVelocityMPS()
|
||||
item.recce=RecceDetecting[groupname]
|
||||
item.isground = group:IsGround() or false
|
||||
item.isship = group:IsShip() or false
|
||||
self:T(string.format("%s group detect by %s/%s", groupname, RecceDetecting[groupname] or "unknown", item.recce or "unknown"))
|
||||
-- Add contact to table.
|
||||
self:AddContact(item)
|
||||
@ -792,8 +794,8 @@ end
|
||||
function INTEL:GetDetectedUnits(Unit, DetectedUnits, RecceDetecting, DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK)
|
||||
|
||||
-- Get detected DCS units.
|
||||
local detectedtargets=Unit:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK)
|
||||
local reccename = Unit:GetName()
|
||||
local detectedtargets=Unit:GetDetectedTargets(DetectVisual, DetectOptical, DetectRadar, DetectIRST, DetectRWR, DetectDLINK)
|
||||
|
||||
for DetectionObjectID, Detection in pairs(detectedtargets or {}) do
|
||||
local DetectedObject=Detection.object -- DCS#Object
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user