This commit is contained in:
FlightControl
2019-03-20 18:03:24 +01:00
parent 3f8468dcc7
commit 985282ba55
2 changed files with 7 additions and 1 deletions

View File

@@ -324,13 +324,16 @@ end
-- @return #string Player Name
-- @return #nil The DCS Unit is not existing or alive.
function UNIT:GetPlayerName()
self:F2( self.UnitName )
self:F( self.UnitName )
local DCSUnit = self:GetDCSObject() -- DCS#Unit
if DCSUnit then
self:F({self:GetName()})
local PlayerName = DCSUnit:getPlayerName()
self:F({PlayerName = PlayerName})
-- TODO Workaround DCS-BUG-3 - https://github.com/FlightControl-Master/MOOSE/issues/696
-- if PlayerName == nil or PlayerName == "" then
-- local PlayerCategory = DCSUnit:getDesc().category