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 develop
This commit is contained in:
commit
1d3abdb268
@ -726,7 +726,7 @@ function ARMYGROUP:Status()
|
|||||||
local mission=self:GetMissionCurrent()
|
local mission=self:GetMissionCurrent()
|
||||||
|
|
||||||
-- If mission, check if DCS task needs to be updated.
|
-- If mission, check if DCS task needs to be updated.
|
||||||
if mission and mission.updateDCSTask and mission:GetGroupStatus(self)==AUFTRAG.GroupStatus.EXECUTING then
|
if mission and mission.updateDCSTask then
|
||||||
|
|
||||||
if mission.type==AUFTRAG.Type.CAPTUREZONE then
|
if mission.type==AUFTRAG.Type.CAPTUREZONE then
|
||||||
|
|
||||||
@ -734,7 +734,9 @@ function ARMYGROUP:Status()
|
|||||||
local Task=mission:GetGroupWaypointTask(self)
|
local Task=mission:GetGroupWaypointTask(self)
|
||||||
|
|
||||||
-- Update task: Engage or get new zone.
|
-- Update task: Engage or get new zone.
|
||||||
self:_UpdateTask(Task, mission)
|
if mission:GetGroupStatus(self)==AUFTRAG.GroupStatus.EXECUTING or mission:GetGroupStatus(self)==AUFTRAG.GroupStatus.STARTED then
|
||||||
|
self:_UpdateTask(Task, mission)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -7577,7 +7577,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Create ORBIT first.
|
-- Create ORBIT first.
|
||||||
local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed, Heading, Leg)
|
local mission=AUFTRAG:NewORBIT(Coordinate or ZoneCAP:GetCoordinate(), Altitude or 10000, Speed or 350, Heading, Leg)
|
||||||
|
|
||||||
-- Mission type CAP.
|
-- Mission type CAP.
|
||||||
mission.type=AUFTRAG.Type.CAP
|
mission.type=AUFTRAG.Type.CAP
|
||||||
@ -7591,6 +7591,7 @@ function AUFTRAG:NewCAP(ZoneCAP, Altitude, Speed, Coordinate, Heading, Leg, Targ
|
|||||||
mission.missionTask=ENUMS.MissionTask.CAP
|
mission.missionTask=ENUMS.MissionTask.CAP
|
||||||
mission.optionROE=ENUMS.ROE.OpenFire
|
mission.optionROE=ENUMS.ROE.OpenFire
|
||||||
mission.optionROT=ENUMS.ROT.EvadeFire
|
mission.optionROT=ENUMS.ROT.EvadeFire
|
||||||
|
mission.missionSpeed = UTILS.KnotsToAltKIAS(Speed or 350,Altitude)
|
||||||
|
|
||||||
mission.categories={AUFTRAG.Category.AIRCRAFT}
|
mission.categories={AUFTRAG.Category.AIRCRAFT}
|
||||||
|
|
||||||
|
|||||||
@ -4440,8 +4440,8 @@ function OPSGROUP:_UpdateTask(Task, Mission)
|
|||||||
self:EngageTarget(targetgroup)
|
self:EngageTarget(targetgroup)
|
||||||
|
|
||||||
else
|
else
|
||||||
-- Error Message.
|
-- Debug info.
|
||||||
self:E(self.lid..string.format("ERROR: Current zone not captured but no target group could be found. This should NOT happen!"))
|
self:T(self.lid..string.format("Zone %s not captured but no target group could be found. Should be captured in the next zone evaluation.", zoneCurr:GetName()))
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1041,6 +1041,10 @@ function OPSZONE:Scan()
|
|||||||
-- Add unit to set.
|
-- Add unit to set.
|
||||||
self.ScanUnitSet:AddUnit(unit)
|
self.ScanUnitSet:AddUnit(unit)
|
||||||
|
|
||||||
|
-- Debug: Had cases where a (red) unit was clearly not inside the zone but the scan did find it!
|
||||||
|
--local inzone=unit:IsInZone(self.zone)
|
||||||
|
--unit:GetCoordinate():MarkToAll(string.format("Unit %s inzone=%s", unit:GetName(), tostring(inzone)))
|
||||||
|
|
||||||
-- Get group of unit.
|
-- Get group of unit.
|
||||||
local group=unit:GetGroup()
|
local group=unit:GetGroup()
|
||||||
|
|
||||||
@ -1121,6 +1125,17 @@ function OPSZONE:Scan()
|
|||||||
-- Debug info.
|
-- Debug info.
|
||||||
if self.verbose>=3 then
|
if self.verbose>=3 then
|
||||||
local text=string.format("Scan result Nred=%d, Nblue=%d, Nneutral=%d", Nred, Nblu, Nnut)
|
local text=string.format("Scan result Nred=%d, Nblue=%d, Nneutral=%d", Nred, Nblu, Nnut)
|
||||||
|
if self.verbose>=4 then
|
||||||
|
for _,_unit in pairs(self.ScanUnitSet:GetSet()) do
|
||||||
|
local unit=_unit --Wrapper.Unit#UNIT
|
||||||
|
text=text..string.format("\nUnit %s coalition=%s", unit:GetName(), unit:GetCoalitionName())
|
||||||
|
end
|
||||||
|
|
||||||
|
for _,_group in pairs(self.ScanGroupSet:GetSet()) do
|
||||||
|
local group=_group --Wrapper.Group#GROUP
|
||||||
|
text=text..string.format("\nGroup %s coalition=%s", group:GetName(), group:GetCoalitionName())
|
||||||
|
end
|
||||||
|
end
|
||||||
self:I(self.lid..text)
|
self:I(self.lid..text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user