OPS Transport

This commit is contained in:
Frank
2021-07-24 01:06:44 +02:00
parent 4ffdf9e536
commit 65e852f341
2 changed files with 78 additions and 7 deletions

View File

@@ -3149,8 +3149,9 @@ end
--- Get coordinate of target. First unit/group of the set is used.
-- @param #AUFTRAG self
-- @param Wrapper.Group#GROUP group Group.
-- @param #number randomradius Random radius in meters.
-- @return Core.Point#COORDINATE Coordinate where the mission is executed.
function AUFTRAG:GetMissionWaypointCoord(group)
function AUFTRAG:GetMissionWaypointCoord(group, randomradius)
-- Check if a coord has been explicitly set.
if self.missionWaypointCoord then
@@ -3166,7 +3167,9 @@ function AUFTRAG:GetMissionWaypointCoord(group)
local alt=waypointcoord.y
-- Add some randomization.
waypointcoord=ZONE_RADIUS:New("Temp", waypointcoord:GetVec2(), 1000):GetRandomCoordinate():SetAltitude(alt, false)
if randomradius then
waypointcoord=ZONE_RADIUS:New("Temp", waypointcoord:GetVec2(), randomradius):GetRandomCoordinate():SetAltitude(alt, false)
end
-- Set altitude of mission waypoint.
if self.missionAltitude then