mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
OPS
- Fixed bug task for recoverytanker mission - Improved capturezone auftrag
This commit is contained in:
parent
3834991e6a
commit
9a949c02c5
@ -726,7 +726,7 @@ function ARMYGROUP:Status()
|
||||
local mission=self:GetMissionCurrent()
|
||||
|
||||
-- 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
|
||||
|
||||
@ -734,7 +734,9 @@ function ARMYGROUP:Status()
|
||||
local Task=mission:GetGroupWaypointTask(self)
|
||||
|
||||
-- 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
|
||||
|
||||
|
||||
@ -943,7 +943,7 @@ function FLIGHTGROUP:Status()
|
||||
local DCSTask=mission:GetDCSMissionTask() --DCS#Task
|
||||
|
||||
-- Get task.
|
||||
local Task=self:GetTaskByID(mission.auftragsnummer)
|
||||
local Task=mission:GetGroupWaypointTask(self)
|
||||
|
||||
-- Reset current orbit task.
|
||||
self.controller:resetTask()
|
||||
|
||||
@ -4438,8 +4438,8 @@ function OPSGROUP:_UpdateTask(Task, Mission)
|
||||
self:EngageTarget(targetgroup)
|
||||
|
||||
else
|
||||
-- Error Message.
|
||||
self:E(self.lid..string.format("ERROR: Current zone not captured but no target group could be found. This should NOT happen!"))
|
||||
-- Debug info.
|
||||
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
|
||||
|
||||
else
|
||||
|
||||
@ -1041,6 +1041,10 @@ function OPSZONE:Scan()
|
||||
-- Add unit to set.
|
||||
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.
|
||||
local group=unit:GetGroup()
|
||||
|
||||
@ -1120,7 +1124,18 @@ function OPSZONE:Scan()
|
||||
|
||||
-- Debug info.
|
||||
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)
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user