- pushing fix for issue with command center reporting.

- pushing fix for issue with markings in cargo tasking not displayed.
- i have removed the workaround for the DCS bug workaround, get the DCS API (getPlayerName()) for a unit is returning "" or nil.
This commit is contained in:
FlightControl
2018-09-29 15:34:21 +02:00
parent dc41852e45
commit a84f0e228a
5 changed files with 53 additions and 18 deletions

View File

@@ -332,12 +332,12 @@ function UNIT:GetPlayerName()
local PlayerName = DCSUnit:getPlayerName()
-- TODO Workaround DCS-BUG-3 - https://github.com/FlightControl-Master/MOOSE/issues/696
if PlayerName == nil or PlayerName == "" then
local PlayerCategory = DCSUnit:getDesc().category
if PlayerCategory == Unit.Category.GROUND_UNIT or PlayerCategory == Unit.Category.SHIP then
PlayerName = "Player" .. DCSUnit:getID()
end
end
-- if PlayerName == nil or PlayerName == "" then
-- local PlayerCategory = DCSUnit:getDesc().category
-- if PlayerCategory == Unit.Category.GROUND_UNIT or PlayerCategory == Unit.Category.SHIP then
-- PlayerName = "Player" .. DCSUnit:getID()
-- end
-- end
-- -- Good code
-- if PlayerName == nil then
-- PlayerName = nil