From 964a6d07088b3000da95239b0df5d3643a29c8c6 Mon Sep 17 00:00:00 2001 From: FlightControl Date: Wed, 20 Mar 2019 18:15:37 +0100 Subject: [PATCH] Debug --- Moose Development/Moose/Tasking/Task.lua | 2 +- Moose Development/Moose/Wrapper/Group.lua | 3 --- Moose Development/Moose/Wrapper/Unit.lua | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Moose Development/Moose/Tasking/Task.lua b/Moose Development/Moose/Tasking/Task.lua index a99012590..797de7d61 100644 --- a/Moose Development/Moose/Tasking/Task.lua +++ b/Moose Development/Moose/Tasking/Task.lua @@ -1808,7 +1808,7 @@ function TASK:GetPlayerNames() --R2.1 Get a map of the players. if PlayerGroup:IsAlive() == true then if self:IsGroupAssigned( PlayerGroup ) then local PlayerNames = PlayerGroup:GetPlayerNames() - for PlayerNameID, PlayerName in pairs( PlayerNames ) do + for PlayerNameID, PlayerName in pairs( PlayerNames or {} ) do PlayerNameMap[PlayerName] = PlayerGroup end end diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index afe7667f2..a790deddd 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -2107,11 +2107,8 @@ do -- Players local PlayerNames = {} - self:F({Group = self:GetName()}) - local Units = self:GetUnits() for UnitID, UnitData in pairs( Units ) do - self:F({UnitData:GetName()}) local Unit = UnitData -- Wrapper.Unit#UNIT local PlayerName = Unit:GetPlayerName() if PlayerName and PlayerName ~= "" then diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index 51b5f2ecb..363e42e08 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -330,10 +330,7 @@ function UNIT:GetPlayerName() 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