mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#AUFTRAG Better use of Ingress Coordinate
This commit is contained in:
@@ -1820,7 +1820,7 @@ end
|
|||||||
|
|
||||||
--- **[AIR]** Create a BOMBRUNWAY mission.
|
--- **[AIR]** Create a BOMBRUNWAY mission.
|
||||||
-- @param #AUFTRAG self
|
-- @param #AUFTRAG self
|
||||||
-- @param Wrapper.Airbase#AIRBASE Airdrome The airbase to bomb. This must be an airdrome (not a FARP or ship) as these to not have a runway.
|
-- @param Wrapper.Airbase#AIRBASE Airdrome The airbase to bomb. This must be an airdrome (not a FARP or ship) as these do not have a runway.
|
||||||
-- @param #number Altitude Engage altitude in feet. Default 25000 ft.
|
-- @param #number Altitude Engage altitude in feet. Default 25000 ft.
|
||||||
-- @return #AUFTRAG self
|
-- @return #AUFTRAG self
|
||||||
function AUFTRAG:NewBOMBRUNWAY(Airdrome, Altitude)
|
function AUFTRAG:NewBOMBRUNWAY(Airdrome, Altitude)
|
||||||
@@ -5832,6 +5832,12 @@ function AUFTRAG:GetMissionWaypointCoord(group, randomradius, surfacetypes)
|
|||||||
end
|
end
|
||||||
return coord
|
return coord
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if a coord has been explicitly set.
|
||||||
|
if self.missionIngressCoord then
|
||||||
|
local coord=self.missionIngressCoord
|
||||||
|
return coord
|
||||||
|
end
|
||||||
|
|
||||||
-- Create waypoint coordinate half way between us and the target.
|
-- Create waypoint coordinate half way between us and the target.
|
||||||
local waypointcoord=COORDINATE:New(0,0,0)
|
local waypointcoord=COORDINATE:New(0,0,0)
|
||||||
|
|||||||
@@ -1041,7 +1041,7 @@ function OPSGROUP:SetReturnToLegion(Switch)
|
|||||||
else
|
else
|
||||||
self.legionReturn=true
|
self.legionReturn=true
|
||||||
end
|
end
|
||||||
self:T(self.lid..string.format("Setting ReturnToLetion=%s", tostring(self.legionReturn)))
|
self:T(self.lid..string.format("Setting ReturnToLegion=%s", tostring(self.legionReturn)))
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -6119,13 +6119,14 @@ function OPSGROUP:RouteToMission(mission, delay)
|
|||||||
local waypoint=nil --#OPSGROUP.Waypoint
|
local waypoint=nil --#OPSGROUP.Waypoint
|
||||||
if self:IsFlightgroup() then
|
if self:IsFlightgroup() then
|
||||||
|
|
||||||
|
|
||||||
local ingresscoord = mission:GetMissionIngressCoord()
|
local ingresscoord = mission:GetMissionIngressCoord()
|
||||||
|
|
||||||
if ingresscoord and not self:IsWaiting() then
|
if ingresscoord and mission:IsReadyToPush() then
|
||||||
waypoint=FLIGHTGROUP.AddWaypoint(self, ingresscoord, SpeedToMission, uid, UTILS.MetersToFeet(ingresscoord.y or self.altitudeCruise), false)
|
waypoint=FLIGHTGROUP.AddWaypoint(self, ingresscoord, SpeedToMission, uid, UTILS.MetersToFeet(self.altitudeCruise), false)
|
||||||
uid=waypoint.uid
|
uid=waypoint.uid
|
||||||
end
|
end
|
||||||
|
|
||||||
waypoint=FLIGHTGROUP.AddWaypoint(self, waypointcoord, SpeedToMission, uid, UTILS.MetersToFeet(mission.missionAltitude or self.altitudeCruise), false)
|
waypoint=FLIGHTGROUP.AddWaypoint(self, waypointcoord, SpeedToMission, uid, UTILS.MetersToFeet(mission.missionAltitude or self.altitudeCruise), false)
|
||||||
|
|
||||||
elseif self:IsArmygroup() then
|
elseif self:IsArmygroup() then
|
||||||
|
|||||||
Reference in New Issue
Block a user