diff --git a/Moose Development/Moose/Ops/Chief.lua b/Moose Development/Moose/Ops/Chief.lua index 7a6ffe020..b449dc95c 100644 --- a/Moose Development/Moose/Ops/Chief.lua +++ b/Moose Development/Moose/Ops/Chief.lua @@ -2132,6 +2132,7 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM if MissionType==AUFTRAG.Type.PATROLZONE then mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone) + mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"}) elseif MissionType==AUFTRAG.Type.ONGUARD then mission=AUFTRAG:NewONGUARD(StratZone.opszone.zone:GetRandomCoordinate(), nil, nil, {land.SurfaceType.LAND}) end @@ -2161,9 +2162,8 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM elseif MissionType==AUFTRAG.Type.CAS then -- Create Patrol zone mission. - --local mission=AUFTRAG:NewCAS(StratZone.opszone.zone, 7000) - local mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone, 250, 7000) - mission:SetEngageDetected(25, TargetTypes,EngageZoneSet,NoEngageZoneSet) + local mission=AUFTRAG:NewPATROLZONE(StratZone.opszone.zone) + mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"}) -- Add assets to mission. for _,asset in pairs(assets) do diff --git a/Moose Development/Moose/Ops/NavyGroup.lua b/Moose Development/Moose/Ops/NavyGroup.lua index c0c581eb9..2ca47fe90 100644 --- a/Moose Development/Moose/Ops/NavyGroup.lua +++ b/Moose Development/Moose/Ops/NavyGroup.lua @@ -1465,7 +1465,7 @@ end -- @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 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. -- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table. function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Updateroute) @@ -1485,6 +1485,11 @@ function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Up -- Create waypoint data table. local waypoint=self:_CreateWaypoint(wp) + -- Set altitude. + if Depth then + waypoint.alt=UTILS.FeetToMeters(Depth) + end + -- Add waypoint to table. self:_AddWaypoint(waypoint, wpnumber) diff --git a/Moose Development/Moose/Ops/OpsGroup.lua b/Moose Development/Moose/Ops/OpsGroup.lua index 1812aad4e..210cb6f55 100644 --- a/Moose Development/Moose/Ops/OpsGroup.lua +++ b/Moose Development/Moose/Ops/OpsGroup.lua @@ -4631,7 +4631,7 @@ function OPSGROUP:RouteToMission(mission, delay) elseif self:IsArmygroup() then waypoint=ARMYGROUP.AddWaypoint(self, egresscoord, SpeedToMission, uid, mission.optionFormation, false) 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 waypoint.missionUID=mission.auftragsnummer mission:SetGroupEgressWaypointUID(self, waypoint.uid) @@ -4854,7 +4854,7 @@ function OPSGROUP:onafterPassingWaypoint(From, Event, To, Waypoint) -- Speed and altitude. 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