Merge pull request #1838 from FlightControl-Master/FF/Ops

OPS
This commit is contained in:
Frank 2022-11-10 00:40:15 +01:00 committed by GitHub
commit a1a258f48e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,7 +159,7 @@ INTEL.Ctype={
--- INTEL class version. --- INTEL class version.
-- @field #string version -- @field #string version
INTEL.version="0.3.4" INTEL.version="0.3.5"
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list -- ToDo list
@ -815,8 +815,8 @@ function INTEL:UpdateIntel()
end end
end end
-- Filter unit categories. -- Filter unit categories. Added check that we have a UNIT and not a STATIC object because :GetUnitCategory() is only available for units.
if #self.filterCategory>0 then if #self.filterCategory>0 and unit:IsInstanceOf("UNIT") then
local unitcategory=unit:GetUnitCategory() local unitcategory=unit:GetUnitCategory()
local keepit=false local keepit=false
for _,filtercategory in pairs(self.filterCategory) do for _,filtercategory in pairs(self.filterCategory) do
@ -1077,11 +1077,13 @@ function INTEL:GetDetectedUnits(Unit, DetectedUnits, RecceDetecting, DetectVisua
RecceDetecting[name]=reccename RecceDetecting[name]=reccename
self:T(string.format("Unit %s detect by %s", name, reccename)) self:T(string.format("Unit %s detect by %s", name, reccename))
else else
local static=STATIC:FindByName(name, false) if self.detectStatics then
if static then local static=STATIC:FindByName(name, false)
--env.info("FF found static "..name) if static then
DetectedUnits[name]=static --env.info("FF found static "..name)
RecceDetecting[name]=reccename DetectedUnits[name]=static
RecceDetecting[name]=reccename
end
end end
end end