This commit is contained in:
Applevangelist 2024-08-14 11:34:57 +02:00
parent d354f02507
commit c82359f87b
2 changed files with 3 additions and 1 deletions

View File

@ -4792,10 +4792,12 @@ do -- SET_CLIENT
local UnitCategory = 0 local UnitCategory = 0
if ClientCategoryID==nil and MClient:IsExist() then if ClientCategoryID==nil and MClient:IsExist() then
ClientCategoryID,UnitCategory=MClient:GetCategory() ClientCategoryID,UnitCategory=MClient:GetCategory()
--self:T3("Applying Category Workaround .. Outcome: Obj is "..tostring(ClientCategoryID).." Unit is "..tostring(UnitCategory))
self:T3( { "Category:", UnitCategory, self.FilterMeta.Categories[CategoryName], CategoryName } ) self:T3( { "Category:", UnitCategory, self.FilterMeta.Categories[CategoryName], CategoryName } )
if self.FilterMeta.Categories[CategoryName] and UnitCategory and self.FilterMeta.Categories[CategoryName] == UnitCategory then if self.FilterMeta.Categories[CategoryName] and UnitCategory and self.FilterMeta.Categories[CategoryName] == UnitCategory then
MClientCategory = true MClientCategory = true
end end
--self:T3("Filter Outcome is "..tostring(MClientCategory))
else else
self:T3( { "Category:", ClientCategoryID, self.FilterMeta.Categories[CategoryName], CategoryName } ) self:T3( { "Category:", ClientCategoryID, self.FilterMeta.Categories[CategoryName], CategoryName } )
if self.FilterMeta.Categories[CategoryName] and ClientCategoryID and self.FilterMeta.Categories[CategoryName] == ClientCategoryID then if self.FilterMeta.Categories[CategoryName] and ClientCategoryID and self.FilterMeta.Categories[CategoryName] == ClientCategoryID then

View File

@ -4109,7 +4109,7 @@ function RANGE:_GetPlayerUnitAndName( _unitName )
-- Get DCS unit from its name. -- Get DCS unit from its name.
local DCSunit = Unit.getByName( _unitName ) local DCSunit = Unit.getByName( _unitName )
if DCSunit then if DCSunit and DCSunit.getPlayerName then
local playername = DCSunit:getPlayerName() local playername = DCSunit:getPlayerName()
local unit = UNIT:Find( DCSunit ) local unit = UNIT:Find( DCSunit )