Merge pull request #826 from FlightControl-Master/FF-Servant

RAT v2.2
This commit is contained in:
Frank 2018-03-11 13:29:05 +01:00 committed by GitHub
commit 309ba285b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1006 additions and 280 deletions

View File

@ -618,10 +618,11 @@ function ZONE_RADIUS:Scan( ObjectCategories )
}
local function EvaluateZone( ZoneObject )
if ZoneObject:isExist() then
--if ZoneObject:isExist() then --FF: isExist always returns false for SCENERY objects since DCS 2.2 and still in DCS 2.5
if ZoneObject then
local ObjectCategory = ZoneObject:getCategory()
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isActive() ) or
ObjectCategory == Object.Category.STATIC then
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isExist() and ZoneObject:isActive() ) or
(ObjectCategory == Object.Category.STATIC and ZoneObject:isExist()) then
local CoalitionDCSUnit = ZoneObject:getCoalition()
self.ScanData.Coalitions[CoalitionDCSUnit] = true
self:E( { Name = ZoneObject:getName(), Coalition = CoalitionDCSUnit } )

File diff suppressed because it is too large Load Diff