mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-13 17:31:41 +00:00
#GROUP Small fix for getting templates data from dynamic spawns (there are no template data!)
This commit is contained in:
@@ -2422,7 +2422,7 @@ end
|
|||||||
-- @return #table The mission route defined by points.
|
-- @return #table The mission route defined by points.
|
||||||
function GROUP:GetTaskRoute()
|
function GROUP:GetTaskRoute()
|
||||||
--self:F2( self.GroupName )
|
--self:F2( self.GroupName )
|
||||||
if _DATABASE.Templates.Groups[self.GroupName].Template and _DATABASE.Templates.Groups[self.GroupName].Template.route and _DATABASE.Templates.Groups[self.GroupName].Template.route.points then
|
if _DATABASE.Templates.Groups[self.GroupName] and _DATABASE.Templates.Groups[self.GroupName].Template and _DATABASE.Templates.Groups[self.GroupName].Template.route and _DATABASE.Templates.Groups[self.GroupName].Template.route.points then
|
||||||
return UTILS.DeepCopy( _DATABASE.Templates.Groups[self.GroupName].Template.route.points )
|
return UTILS.DeepCopy( _DATABASE.Templates.Groups[self.GroupName].Template.route.points )
|
||||||
else
|
else
|
||||||
return {}
|
return {}
|
||||||
@@ -2450,7 +2450,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
|||||||
|
|
||||||
--self:T3( { GroupName } )
|
--self:T3( { GroupName } )
|
||||||
|
|
||||||
local Template = _DATABASE.Templates.Groups[GroupName].Template
|
local Template = _DATABASE.Templates.Groups[GroupName] and _DATABASE.Templates.Groups[GroupName].Template or nil
|
||||||
|
|
||||||
if Template then
|
if Template then
|
||||||
if not Begin then
|
if not Begin then
|
||||||
@@ -2474,7 +2474,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
|||||||
end
|
end
|
||||||
return Points
|
return Points
|
||||||
else
|
else
|
||||||
error( "Template not found for Group : " .. GroupName )
|
BASE:E( "Template not found for Group : " .. GroupName )
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user