diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index a5d5246de..2ecbdcf6e 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -554,7 +554,7 @@ end -- @param #table SpawnTemplate Template of the group to spawn. -- @param #string Groupname (Optional) Name of the group. -- @return Wrapper.Group#GROUP Spawned group. -function DATABASE:Spawn( SpawnTemplate, Groupname ) +function DATABASE:Spawn( SpawnTemplate ) self:F( SpawnTemplate.name ) self:T( { SpawnTemplate.SpawnCountryID, SpawnTemplate.SpawnCategoryID } ) @@ -569,7 +569,7 @@ function DATABASE:Spawn( SpawnTemplate, Groupname ) SpawnTemplate.CountryID = nil SpawnTemplate.CategoryID = nil - self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID, Groupname ) + self:_RegisterGroupTemplate( SpawnTemplate, SpawnCoalitionID, SpawnCategoryID, SpawnCountryID ) self:T3( SpawnTemplate ) coalition.addGroup( SpawnCountryID, SpawnCategoryID, SpawnTemplate ) diff --git a/Moose Development/Moose/Ops/FlightGroup.lua b/Moose Development/Moose/Ops/FlightGroup.lua index fcf10186e..0e146eca1 100644 --- a/Moose Development/Moose/Ops/FlightGroup.lua +++ b/Moose Development/Moose/Ops/FlightGroup.lua @@ -1301,8 +1301,7 @@ function FLIGHTGROUP:onafterHold(From, Event, To, airbase, SpeedTo, SpeedHold) local wp={} wp[1]=self.group:GetCoordinate():WaypointAir(nil, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint,SpeedTo, true , nil, {}, "Current Pos") wp[2]=coordAB:WaypointAir(nil, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint,SpeedTo, true , nil, {TaskArrived, TaskControlled}, "Holding Point") - wp[3]=coordAB:Translate(50000, 270):WaypointAir(nil, COORDINATE.WaypointType.TurningPoint, COORDINATE.WaypointAction.FlyoverPoint,SpeedTo, true , nil, {}, "Test 50 km") - wp[4]=coordAB:WaypointAirLanding(SpeedHold, airbase, {}, "Landing") + wp[3]=coordAB:WaypointAirLanding(SpeedHold, airbase, {}, "Landing") local respawn=true @@ -1316,13 +1315,12 @@ function FLIGHTGROUP:onafterHold(From, Event, To, airbase, SpeedTo, SpeedHold) MESSAGE:New("Respawning group"):ToAll() - --Respawn the group. - self.group=self.group:Respawn(Template, nil) + self.group=self.group:Respawn(Template, true) end - self.group:Route(wp, 0.1) + --self.group:Route(wp, 1) --self:RouteRTB(RTBAirbase,Speed,Altitude,TaskOverhead) end diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index db9fb25db..20f1ad457 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -1639,7 +1639,7 @@ function GROUP:Respawn( Template, Reset ) self:F(GroupUnit:GetName()) if GroupUnit:IsAlive() then - self:F("Alive") + self:I("FF Alive") -- Get unit position vector. local GroupUnitVec3 = GroupUnit:GetVec3() @@ -1739,8 +1739,8 @@ function GROUP:Respawn( Template, Reset ) local coord=unit:GetCoordinate() local heading=unit:GetHeading() Unit.x=coord.x - Unit.z=coord.y - Unit.alt=coord.alt + Unit.y=coord.z + Unit.alt=coord.y Unit.heading=math.rad(heading) Unit.psi=-Unit.heading end