Fixed the boarding and unboarding process for CARGO_GROUP

This commit is contained in:
FlightControl
2017-04-18 10:24:12 +02:00
parent 469e1a3c9b
commit f6f91a0f23
3 changed files with 123 additions and 87 deletions

View File

@@ -156,6 +156,7 @@ end
-- @param #GROUP self
-- @return Dcs.DCSWrapper.Group#Group The DCS Group.
function GROUP:GetDCSObject()
self:F(self.GroupName)
local DCSGroup = Group.getByName( self.GroupName )
if DCSGroup then
@@ -319,6 +320,7 @@ function GROUP:GetUnit( UnitNumber )
local DCSGroup = self:GetDCSObject()
if DCSGroup then
local DCSUnit = DCSGroup:getUnit( UnitNumber )
local UnitFound = UNIT:Find( DCSGroup:getUnit( UnitNumber ) )
self:T2( UnitFound )
return UnitFound