This commit is contained in:
Applevangelist
2025-11-16 16:52:41 +01:00
parent 4bc25c6043
commit f4a2ae8ccc
4 changed files with 93 additions and 229 deletions
+13 -2
View File
@@ -4302,7 +4302,16 @@ function OPSGROUP:_UpdateTask(Task, Mission)
Mission=Mission or self:GetMissionByTaskID(self.taskcurrent)
if Task.dcstask.id==AUFTRAG.SpecialTask.FORMATION then
if Mission.Type == AUFTRAG.Type.RESCUEHELO then
local param=Task.dcstask.params
local followUnit=UNIT:FindByName(param.unitname)
local helogroupname = self:GetGroup():GetName()
Task.formation = RESCUEHELO:New(followUnit,helogroupname)
-- Start formation FSM.
Task.formation:Start()
else
-- Set of group(s) to follow Mother.
local followSet=SET_GROUP:New():AddGroup(self.group)
@@ -4324,7 +4333,9 @@ function OPSGROUP:_UpdateTask(Task, Mission)
-- Start formation FSM.
Task.formation:Start()
end
elseif Task.dcstask.id==AUFTRAG.SpecialTask.PATROLZONE then
---
+17 -8
View File
@@ -870,15 +870,24 @@ function RESCUEHELO:onafterStart(From, Event, To)
-- Delay before formation is started.
local delay=120
-- Spawn helo. We need to introduce an alias in case this class is used twice. This would confuse the spawn routine.
local Spawn=SPAWN:NewWithAlias(self.helogroupname, self.alias)
-- Set modex for spawn.
Spawn:InitModex(self.modex)
local UsesAliveGroup=false
local Spawn = GROUP:FindByName(self.helogroupname)
if Spawn and Spawn:IsAlive() then
self.helo=Spawn
UsesAliveGroup = true
else
-- Spawn helo. We need to introduce an alias in case this class is used twice. This would confuse the spawn routine.
local Spawn=SPAWN:NewWithAlias(self.helogroupname, self.alias)
-- Set modex for spawn.
Spawn:InitModex(self.modex)
end
-- Spawn in air or at airbase.
if self.takeoff==SPAWN.Takeoff.Air then
if UsesAliveGroup==false and self.takeoff==SPAWN.Takeoff.Air then
-- Carrier heading
local hdg=self.carrier:GetHeading()
@@ -898,7 +907,7 @@ function RESCUEHELO:onafterStart(From, Event, To)
-- Start formation in 1 seconds
delay=1
else
elseif UsesAliveGroup==false then
-- Check if an uncontrolled helo group was requested.
if self.uncontrolledac then