mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPSGROUP
- Improved behaviour when mission is unpaused and groups are teleported
This commit is contained in:
@@ -1403,6 +1403,8 @@ function AUFTRAG:NewINTERCEPT(Target)
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- **[AIR]** Create a CAP mission.
|
--- **[AIR]** Create a CAP mission.
|
||||||
|
-- Assinged groups are tasked to execute a CAP mission. This consists of a DCS orbit task combined with an enroute "search and engage in zone" task.
|
||||||
|
-- **Note** that currently DCS only supports *circular* zones for the task.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Core.Zone#ZONE_RADIUS ZoneCAP Circular CAP zone. Detected targets in this zone will be engaged.
|
-- @param Core.Zone#ZONE_RADIUS ZoneCAP Circular CAP zone. Detected targets in this zone will be engaged.
|
||||||
-- @param #number Altitude Altitude at which to orbit in feet. Default is 10,000 ft.
|
-- @param #number Altitude Altitude at which to orbit in feet. Default is 10,000 ft.
|
||||||
|
|||||||
@@ -2002,6 +2002,9 @@ function FLIGHTGROUP:onafterElementAirborne(From, Event, To, Element)
|
|||||||
|
|
||||||
-- Debug info.
|
-- Debug info.
|
||||||
self:T2(self.lid..string.format("Element airborne %s", Element.name))
|
self:T2(self.lid..string.format("Element airborne %s", Element.name))
|
||||||
|
|
||||||
|
-- Set parking spot to free. Also for FC. This is usually done after taxiing but doing it here in case the group is teleported.
|
||||||
|
self:_SetElementParkingFree(Element)
|
||||||
|
|
||||||
-- Set element status.
|
-- Set element status.
|
||||||
self:_UpdateStatus(Element, OPSGROUP.ElementStatus.AIRBORNE)
|
self:_UpdateStatus(Element, OPSGROUP.ElementStatus.AIRBORNE)
|
||||||
|
|||||||
@@ -5589,10 +5589,13 @@ function OPSGROUP:onafterUnpauseMission(From, Event, To)
|
|||||||
-- Debug info.
|
-- Debug info.
|
||||||
self:T(self.lid..string.format("Unpausing mission %s [%s]", mission:GetName(), mission:GetType()))
|
self:T(self.lid..string.format("Unpausing mission %s [%s]", mission:GetName(), mission:GetType()))
|
||||||
|
|
||||||
|
-- Set state of mission, e.g. for not teleporting again
|
||||||
|
mission.unpaused=true
|
||||||
|
|
||||||
-- Start mission.
|
-- Start mission.
|
||||||
self:MissionStart(mission)
|
self:MissionStart(mission)
|
||||||
|
|
||||||
-- Remove mission from
|
-- Remove mission from pausedmissions queue
|
||||||
for i,mid in pairs(self.pausedmissions) do
|
for i,mid in pairs(self.pausedmissions) do
|
||||||
--self:T(self.lid..string.format("Checking paused mission", mid))
|
--self:T(self.lid..string.format("Checking paused mission", mid))
|
||||||
if mid==mission.auftragsnummer then
|
if mid==mission.auftragsnummer then
|
||||||
@@ -6232,7 +6235,7 @@ function OPSGROUP:RouteToMission(mission, delay)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Check if group is mobile. Note that some immobile units report a speed of 1 m/s = 3.6 km/h.
|
-- Check if group is mobile. Note that some immobile units report a speed of 1 m/s = 3.6 km/h.
|
||||||
if self.speedMax<=3.6 or mission.teleport then
|
if (self.speedMax<=3.6 or mission.teleport) and not mission.unpaused then
|
||||||
|
|
||||||
-- Teleport to waypoint coordinate. Mission will not be paused.
|
-- Teleport to waypoint coordinate. Mission will not be paused.
|
||||||
self:Teleport(waypointcoord, nil, true)
|
self:Teleport(waypointcoord, nil, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user