mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Updates for Anapa. Fixed a bug in SPAWN (small bug)
This commit is contained in:
parent
4adf5aa188
commit
bfeaa961f6
@ -345,6 +345,12 @@ function DATABASE:_RegisterGroup( GroupTemplate )
|
|||||||
self.Groups[GroupTemplateName] = {}
|
self.Groups[GroupTemplateName] = {}
|
||||||
self.Groups[GroupTemplateName].Status = nil
|
self.Groups[GroupTemplateName].Status = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Delete the spans from the route, it is not needed and takes memory.
|
||||||
|
if GroupTemplate.route and GroupTemplate.route.spans then
|
||||||
|
GroupTemplate.route.spans = nil
|
||||||
|
end
|
||||||
|
|
||||||
self.Groups[GroupTemplateName].GroupName = GroupTemplateName
|
self.Groups[GroupTemplateName].GroupName = GroupTemplateName
|
||||||
self.Groups[GroupTemplateName].Template = GroupTemplate
|
self.Groups[GroupTemplateName].Template = GroupTemplate
|
||||||
self.Groups[GroupTemplateName].groupId = GroupTemplate.groupId
|
self.Groups[GroupTemplateName].groupId = GroupTemplate.groupId
|
||||||
|
|||||||
@ -601,7 +601,7 @@ end
|
|||||||
-- @param #number Speed The speed flying when holding the position.
|
-- @param #number Speed The speed flying when holding the position.
|
||||||
-- @return #GROUP self
|
-- @return #GROUP self
|
||||||
function GROUP:TaskOrbitCircleAtVec2( Point, Altitude, Speed )
|
function GROUP:TaskOrbitCircleAtVec2( Point, Altitude, Speed )
|
||||||
self:F( { self.GroupName, Point, Altitude, Speed } )
|
self:F( { self.GroupName, Point, Altitude, Speed } )
|
||||||
|
|
||||||
-- pattern = enum AI.Task.OribtPattern,
|
-- pattern = enum AI.Task.OribtPattern,
|
||||||
-- point = Vec2,
|
-- point = Vec2,
|
||||||
|
|||||||
@ -589,6 +589,9 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
|||||||
if SpawnTemplate then
|
if SpawnTemplate then
|
||||||
|
|
||||||
local UnitPoint = HostUnit:GetPointVec2()
|
local UnitPoint = HostUnit:GetPointVec2()
|
||||||
|
|
||||||
|
self:T( { "Current point of ", self.SpawnTemplatePrefix, UnitPoint } )
|
||||||
|
|
||||||
--for PointID, Point in pairs( SpawnTemplate.route.points ) do
|
--for PointID, Point in pairs( SpawnTemplate.route.points ) do
|
||||||
--Point.x = UnitPoint.x
|
--Point.x = UnitPoint.x
|
||||||
--Point.y = UnitPoint.y
|
--Point.y = UnitPoint.y
|
||||||
@ -596,9 +599,6 @@ function SPAWN:SpawnFromUnit( HostUnit, OuterRadius, InnerRadius, SpawnIndex )
|
|||||||
--Point.alt_type = nil
|
--Point.alt_type = nil
|
||||||
--end
|
--end
|
||||||
|
|
||||||
SpawnTemplate.route.points = nil
|
|
||||||
SpawnTemplate.route.points = {}
|
|
||||||
SpawnTemplate.route.points[1] = {}
|
|
||||||
SpawnTemplate.route.points[1].x = UnitPoint.x
|
SpawnTemplate.route.points[1].x = UnitPoint.x
|
||||||
SpawnTemplate.route.points[1].y = UnitPoint.y
|
SpawnTemplate.route.points[1].y = UnitPoint.y
|
||||||
|
|
||||||
@ -1056,6 +1056,7 @@ function SPAWN:_RandomizeTemplate( SpawnIndex )
|
|||||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.route = routines.utils.deepCopy( self.SpawnTemplate.route )
|
self.SpawnGroups[SpawnIndex].SpawnTemplate.route = routines.utils.deepCopy( self.SpawnTemplate.route )
|
||||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.x = self.SpawnTemplate.x
|
self.SpawnGroups[SpawnIndex].SpawnTemplate.x = self.SpawnTemplate.x
|
||||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.y = self.SpawnTemplate.y
|
self.SpawnGroups[SpawnIndex].SpawnTemplate.y = self.SpawnTemplate.y
|
||||||
|
self.SpawnGroups[SpawnIndex].SpawnTemplate.start_time = self.SpawnTemplate.start_time
|
||||||
for UnitID = 1, #self.SpawnGroups[SpawnIndex].SpawnTemplate.units do
|
for UnitID = 1, #self.SpawnGroups[SpawnIndex].SpawnTemplate.units do
|
||||||
self.SpawnGroups[SpawnIndex].SpawnTemplate.units[UnitID].heading = self.SpawnTemplate.units[1].heading
|
self.SpawnGroups[SpawnIndex].SpawnTemplate.units[UnitID].heading = self.SpawnTemplate.units[1].heading
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user