mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
OPS
- Fixed mission alt for patrol zone auftrag
This commit is contained in:
@@ -2132,6 +2132,7 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM
|
|||||||
|
|
||||||
if MissionType==AUFTRAG.Type.PATROLZONE then
|
if MissionType==AUFTRAG.Type.PATROLZONE then
|
||||||
mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone)
|
mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone)
|
||||||
|
mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"})
|
||||||
elseif MissionType==AUFTRAG.Type.ONGUARD then
|
elseif MissionType==AUFTRAG.Type.ONGUARD then
|
||||||
mission=AUFTRAG:NewONGUARD(StratZone.opszone.zone:GetRandomCoordinate(), nil, nil, {land.SurfaceType.LAND})
|
mission=AUFTRAG:NewONGUARD(StratZone.opszone.zone:GetRandomCoordinate(), nil, nil, {land.SurfaceType.LAND})
|
||||||
end
|
end
|
||||||
@@ -2161,9 +2162,8 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM
|
|||||||
elseif MissionType==AUFTRAG.Type.CAS then
|
elseif MissionType==AUFTRAG.Type.CAS then
|
||||||
|
|
||||||
-- Create Patrol zone mission.
|
-- Create Patrol zone mission.
|
||||||
--local mission=AUFTRAG:NewCAS(StratZone.opszone.zone, 7000)
|
local mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone)
|
||||||
local mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone, 250, 7000)
|
mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"})
|
||||||
mission:SetEngageDetected(25, TargetTypes,EngageZoneSet,NoEngageZoneSet)
|
|
||||||
|
|
||||||
-- Add assets to mission.
|
-- Add assets to mission.
|
||||||
for _,asset in pairs(assets) do
|
for _,asset in pairs(assets) do
|
||||||
|
|||||||
@@ -1465,7 +1465,7 @@ end
|
|||||||
-- @param Core.Point#COORDINATE Coordinate The coordinate of the waypoint. Use `COORDINATE:SetAltitude()` to define the altitude.
|
-- @param Core.Point#COORDINATE Coordinate The coordinate of the waypoint. Use `COORDINATE:SetAltitude()` to define the altitude.
|
||||||
-- @param #number Speed Speed in knots. Default is default cruise speed or 70% of max speed.
|
-- @param #number Speed Speed in knots. Default is default cruise speed or 70% of max speed.
|
||||||
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
|
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
|
||||||
-- @param #number Depth Depth at waypoint in meters. Only for submarines.
|
-- @param #number Depth Depth at waypoint in feet. Only for submarines.
|
||||||
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
|
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
|
||||||
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
|
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
|
||||||
function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Updateroute)
|
function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Updateroute)
|
||||||
@@ -1485,6 +1485,11 @@ function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Up
|
|||||||
-- Create waypoint data table.
|
-- Create waypoint data table.
|
||||||
local waypoint=self:_CreateWaypoint(wp)
|
local waypoint=self:_CreateWaypoint(wp)
|
||||||
|
|
||||||
|
-- Set altitude.
|
||||||
|
if Depth then
|
||||||
|
waypoint.alt=UTILS.FeetToMeters(Depth)
|
||||||
|
end
|
||||||
|
|
||||||
-- Add waypoint to table.
|
-- Add waypoint to table.
|
||||||
self:_AddWaypoint(waypoint, wpnumber)
|
self:_AddWaypoint(waypoint, wpnumber)
|
||||||
|
|
||||||
|
|||||||
@@ -4631,7 +4631,7 @@ function OPSGROUP:RouteToMission(mission, delay)
|
|||||||
elseif self:IsArmygroup() then
|
elseif self:IsArmygroup() then
|
||||||
waypoint=ARMYGROUP.AddWaypoint(self, egresscoord, SpeedToMission, uid, mission.optionFormation, false)
|
waypoint=ARMYGROUP.AddWaypoint(self, egresscoord, SpeedToMission, uid, mission.optionFormation, false)
|
||||||
elseif self:IsNavygroup() then
|
elseif self:IsNavygroup() then
|
||||||
waypoint=NAVYGROUP.AddWaypoint(self, egresscoord, SpeedToMission, uid, mission.missionAltitude or self.altitudeCruise, false)
|
waypoint=NAVYGROUP.AddWaypoint(self, egresscoord, SpeedToMission, uid, UTILS.MetersToFeet(mission.missionAltitude or self.altitudeCruise), false)
|
||||||
end
|
end
|
||||||
waypoint.missionUID=mission.auftragsnummer
|
waypoint.missionUID=mission.auftragsnummer
|
||||||
mission:SetGroupEgressWaypointUID(self, waypoint.uid)
|
mission:SetGroupEgressWaypointUID(self, waypoint.uid)
|
||||||
@@ -4854,7 +4854,7 @@ function OPSGROUP:onafterPassingWaypoint(From, Event, To, Waypoint)
|
|||||||
|
|
||||||
-- Speed and altitude.
|
-- Speed and altitude.
|
||||||
local Speed=UTILS.KmphToKnots(task.dcstask.params.speed or self.speedCruise)
|
local Speed=UTILS.KmphToKnots(task.dcstask.params.speed or self.speedCruise)
|
||||||
local Altitude=task.dcstask.params.altitude and UTILS.MetersToFeet(task.dcstask.params.altitude) or nil
|
local Altitude=UTILS.MetersToFeet(task.dcstask.params.altitude or self.altitudeCruise)
|
||||||
|
|
||||||
local currUID=self:GetWaypointCurrent().uid
|
local currUID=self:GetWaypointCurrent().uid
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user