This commit is contained in:
Applevangelist
2024-07-14 18:48:23 +02:00
parent cfc0cc66b2
commit 9ecaca365f
4 changed files with 17 additions and 10 deletions

View File

@@ -447,7 +447,14 @@ function UNIT:IsPlayer()
-- Units of template group.
local template = group:GetTemplate()
if (template == nil) or (template.units == nil ) then return false end
if (template == nil) or (template.units == nil ) then
local DCSObject = self:GetDCSObject()
if DCSObject then
if DCSObject:getPlayerName() ~= nil then return true else return false end
else
return false
end
end
local units=template.units