mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-26 11:57:16 +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.
|
||||
function GROUP:GetTaskRoute()
|
||||
--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 )
|
||||
else
|
||||
return {}
|
||||
@@ -2450,7 +2450,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
||||
|
||||
--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 not Begin then
|
||||
@@ -2474,7 +2474,7 @@ function GROUP:CopyRoute( Begin, End, Randomize, Radius )
|
||||
end
|
||||
return Points
|
||||
else
|
||||
error( "Template not found for Group : " .. GroupName )
|
||||
BASE:E( "Template not found for Group : " .. GroupName )
|
||||
end
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user