mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/develop' into branch
This commit is contained in:
@@ -2185,6 +2185,7 @@ function AUFTRAG:NewARTY(Target, Nshots, Radius, Altitude)
|
|||||||
mission.optionAlarm=0
|
mission.optionAlarm=0
|
||||||
|
|
||||||
mission.missionFraction=0.0
|
mission.missionFraction=0.0
|
||||||
|
mission.missionWaypointRadius=0.0
|
||||||
|
|
||||||
-- Evaluate after 8 min.
|
-- Evaluate after 8 min.
|
||||||
mission.dTevaluate=8*60
|
mission.dTevaluate=8*60
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
-- ### Author: **applevangelist**
|
-- ### Author: **applevangelist**
|
||||||
-- @date Last Update Dec 2024
|
-- @date Last Update Jan 2025
|
||||||
-- @module Ops.AWACS
|
-- @module Ops.AWACS
|
||||||
-- @image OPS_AWACS.jpg
|
-- @image OPS_AWACS.jpg
|
||||||
|
|
||||||
|
|||||||
@@ -1345,12 +1345,12 @@ function OPSGROUP:GetCoordinateInRange(TargetCoord, WeaponBitType, RefCoord, Sur
|
|||||||
local weapondata=self:GetWeaponData(WeaponBitType)
|
local weapondata=self:GetWeaponData(WeaponBitType)
|
||||||
|
|
||||||
-- Heading intervals to search for a possible new coordinate in range.
|
-- Heading intervals to search for a possible new coordinate in range.
|
||||||
local dh={0, -5, 5, -10, 10, -15, 15, -20, 20, -25, 25, -30, 30}
|
local dh={0, -5, 5, -10, 10, -15, 15, -20, 20, -25, 25, -30, 30, -35, 35, -40, 40, -45, 45, -50, 50, -55, 55, -60, 60, -65, 65, -70, 70, -75, 75, -80, 80}
|
||||||
|
|
||||||
-- Function that checks if the given surface type is valid.ss
|
-- Function that checks if the given surface type is valid
|
||||||
local function _checkSurface(point)
|
local function _checkSurface(point)
|
||||||
if SurfaceTypes then
|
if SurfaceTypes then
|
||||||
local stype=land.getSurfaceType(point)
|
local stype=point:GetSurfaceType()
|
||||||
for _,sf in pairs(SurfaceTypes) do
|
for _,sf in pairs(SurfaceTypes) do
|
||||||
if sf==stype then
|
if sf==stype then
|
||||||
return true
|
return true
|
||||||
@@ -1387,7 +1387,7 @@ function OPSGROUP:GetCoordinateInRange(TargetCoord, WeaponBitType, RefCoord, Sur
|
|||||||
local h=heading+delta
|
local h=heading+delta
|
||||||
|
|
||||||
-- New waypoint coord.
|
-- New waypoint coord.
|
||||||
coordInRange=TargetCoord:Translate(range*1.02, h)
|
coordInRange=TargetCoord:Translate(range, h)
|
||||||
|
|
||||||
if _checkSurface(coordInRange) then
|
if _checkSurface(coordInRange) then
|
||||||
break
|
break
|
||||||
@@ -6100,13 +6100,12 @@ function OPSGROUP:RouteToMission(mission, delay)
|
|||||||
-- Target Coord.
|
-- Target Coord.
|
||||||
local targetcoord=mission:GetTargetCoordinate()
|
local targetcoord=mission:GetTargetCoordinate()
|
||||||
|
|
||||||
|
|
||||||
-- In range already?
|
-- In range already?
|
||||||
local inRange=self:InWeaponRange(targetcoord, mission.engageWeaponType)
|
local inRange=self:InWeaponRange(targetcoord, mission.engageWeaponType, waypointcoord)
|
||||||
|
|
||||||
if inRange then
|
if inRange then
|
||||||
|
|
||||||
waypointcoord=self:GetCoordinate(true)
|
--waypointcoord=self:GetCoordinate(true)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -6183,8 +6182,6 @@ function OPSGROUP:RouteToMission(mission, delay)
|
|||||||
formation=ENUMS.Formation.Vehicle.OffRoad
|
formation=ENUMS.Formation.Vehicle.OffRoad
|
||||||
end
|
end
|
||||||
|
|
||||||
waypointcoord:MarkToAll("Bla Bla")
|
|
||||||
|
|
||||||
waypoint=ARMYGROUP.AddWaypoint(self, waypointcoord, SpeedToMission, uid, formation, false)
|
waypoint=ARMYGROUP.AddWaypoint(self, waypointcoord, SpeedToMission, uid, formation, false)
|
||||||
|
|
||||||
elseif self:IsNavygroup() then
|
elseif self:IsNavygroup() then
|
||||||
|
|||||||
Reference in New Issue
Block a user