mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Debug
This commit is contained in:
@@ -1808,7 +1808,7 @@ function TASK:GetPlayerNames() --R2.1 Get a map of the players.
|
|||||||
if PlayerGroup:IsAlive() == true then
|
if PlayerGroup:IsAlive() == true then
|
||||||
if self:IsGroupAssigned( PlayerGroup ) then
|
if self:IsGroupAssigned( PlayerGroup ) then
|
||||||
local PlayerNames = PlayerGroup:GetPlayerNames()
|
local PlayerNames = PlayerGroup:GetPlayerNames()
|
||||||
for PlayerNameID, PlayerName in pairs( PlayerNames ) do
|
for PlayerNameID, PlayerName in pairs( PlayerNames or {} ) do
|
||||||
PlayerNameMap[PlayerName] = PlayerGroup
|
PlayerNameMap[PlayerName] = PlayerGroup
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2107,11 +2107,8 @@ do -- Players
|
|||||||
|
|
||||||
local PlayerNames = {}
|
local PlayerNames = {}
|
||||||
|
|
||||||
self:F({Group = self:GetName()})
|
|
||||||
|
|
||||||
local Units = self:GetUnits()
|
local Units = self:GetUnits()
|
||||||
for UnitID, UnitData in pairs( Units ) do
|
for UnitID, UnitData in pairs( Units ) do
|
||||||
self:F({UnitData:GetName()})
|
|
||||||
local Unit = UnitData -- Wrapper.Unit#UNIT
|
local Unit = UnitData -- Wrapper.Unit#UNIT
|
||||||
local PlayerName = Unit:GetPlayerName()
|
local PlayerName = Unit:GetPlayerName()
|
||||||
if PlayerName and PlayerName ~= "" then
|
if PlayerName and PlayerName ~= "" then
|
||||||
|
|||||||
@@ -330,10 +330,7 @@ function UNIT:GetPlayerName()
|
|||||||
|
|
||||||
if DCSUnit then
|
if DCSUnit then
|
||||||
|
|
||||||
self:F({self:GetName()})
|
|
||||||
|
|
||||||
local PlayerName = DCSUnit:getPlayerName()
|
local PlayerName = DCSUnit:getPlayerName()
|
||||||
self:F({PlayerName = PlayerName})
|
|
||||||
-- TODO Workaround DCS-BUG-3 - https://github.com/FlightControl-Master/MOOSE/issues/696
|
-- TODO Workaround DCS-BUG-3 - https://github.com/FlightControl-Master/MOOSE/issues/696
|
||||||
-- if PlayerName == nil or PlayerName == "" then
|
-- if PlayerName == nil or PlayerName == "" then
|
||||||
-- local PlayerCategory = DCSUnit:getDesc().category
|
-- local PlayerCategory = DCSUnit:getDesc().category
|
||||||
|
|||||||
Reference in New Issue
Block a user