mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
#RANGE Fix trying to get a playername on dynamic cargo spawns
This commit is contained in:
parent
d36cd8e284
commit
872bb3d775
@ -4109,7 +4109,7 @@ function RANGE:_GetPlayerUnitAndName( _unitName )
|
||||
-- Get DCS unit from its name.
|
||||
local DCSunit = Unit.getByName( _unitName )
|
||||
|
||||
if DCSunit then
|
||||
if DCSunit and DCSunit.getPlayerName then
|
||||
|
||||
local playername = DCSunit:getPlayerName()
|
||||
local unit = UNIT:Find( DCSunit )
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user