mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Progress on the new cargo group movements
This commit is contained in:
@@ -193,10 +193,12 @@ end
|
||||
-- @param #number Heading The heading of the unit respawn.
|
||||
function UNIT:ReSpawn( SpawnVec3, Heading )
|
||||
|
||||
self:T( self:Name() )
|
||||
local SpawnGroupTemplate = UTILS.DeepCopy( _DATABASE:GetGroupTemplateFromUnitName( self:Name() ) )
|
||||
self:T( SpawnGroupTemplate )
|
||||
|
||||
local SpawnGroup = self:GetGroup()
|
||||
self:T( { SpawnGroup = SpawnGroup } )
|
||||
|
||||
if SpawnGroup then
|
||||
|
||||
@@ -221,7 +223,7 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
|
||||
end
|
||||
|
||||
for UnitTemplateID, UnitTemplateData in pairs( SpawnGroupTemplate.units ) do
|
||||
self:T( UnitTemplateData.name )
|
||||
self:T( { UnitTemplateData.name, self:Name() } )
|
||||
if UnitTemplateData.name == self:Name() then
|
||||
self:T("Adjusting")
|
||||
SpawnGroupTemplate.units[UnitTemplateID].alt = SpawnVec3.y
|
||||
@@ -261,6 +263,8 @@ function UNIT:ReSpawn( SpawnVec3, Heading )
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
|
||||
self:T( SpawnGroupTemplate )
|
||||
|
||||
_DATABASE:Spawn( SpawnGroupTemplate )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user