Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Applevangelist committed Jan 13, 2025
2 parents 8ffa1bd + 4953000 commit b82e15b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
1 change: 1 addition & 0 deletions Moose Development/Moose/Ops/Auftrag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,7 @@ function AUFTRAG:NewARTY(Target, Nshots, Radius, Altitude)
mission.optionAlarm=0

mission.missionFraction=0.0
mission.missionWaypointRadius=0.0

-- Evaluate after 8 min.
mission.dTevaluate=8*60
Expand Down
2 changes: 1 addition & 1 deletion Moose Development/Moose/Ops/Awacs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
-- ===
--
-- ### Author: **applevangelist**
-- @date Last Update Dec 2024
-- @date Last Update Jan 2025
-- @module Ops.AWACS
-- @image OPS_AWACS.jpg

Expand Down
15 changes: 6 additions & 9 deletions Moose Development/Moose/Ops/OpsGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1345,12 +1345,12 @@ function OPSGROUP:GetCoordinateInRange(TargetCoord, WeaponBitType, RefCoord, Sur
local weapondata=self:GetWeaponData(WeaponBitType)

-- 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)
if SurfaceTypes then
local stype=land.getSurfaceType(point)
local stype=point:GetSurfaceType()
for _,sf in pairs(SurfaceTypes) do
if sf==stype then
return true
Expand Down Expand Up @@ -1387,7 +1387,7 @@ function OPSGROUP:GetCoordinateInRange(TargetCoord, WeaponBitType, RefCoord, Sur
local h=heading+delta

-- New waypoint coord.
coordInRange=TargetCoord:Translate(range*1.02, h)
coordInRange=TargetCoord:Translate(range, h)

if _checkSurface(coordInRange) then
break
Expand Down Expand Up @@ -6100,13 +6100,12 @@ function OPSGROUP:RouteToMission(mission, delay)
-- Target Coord.
local targetcoord=mission:GetTargetCoordinate()


-- In range already?
local inRange=self:InWeaponRange(targetcoord, mission.engageWeaponType)
local inRange=self:InWeaponRange(targetcoord, mission.engageWeaponType, waypointcoord)

if inRange then

waypointcoord=self:GetCoordinate(true)
--waypointcoord=self:GetCoordinate(true)

else

Expand Down Expand Up @@ -6183,8 +6182,6 @@ function OPSGROUP:RouteToMission(mission, delay)
formation=ENUMS.Formation.Vehicle.OffRoad
end

waypointcoord:MarkToAll("Bla Bla")

waypoint=ARMYGROUP.AddWaypoint(self, waypointcoord, SpeedToMission, uid, formation, false)

elseif self:IsNavygroup() then
Expand Down

0 comments on commit b82e15b

Please sign in to comment.