From 7b6bf7f39ba5c84957645d1dcc612bac33d2fa44 Mon Sep 17 00:00:00 2001 From: smiki Date: Mon, 14 Jul 2025 19:04:26 +0200 Subject: [PATCH] [FIXED] AUFTRAG and FSM state mismatch workaround for `AUFTRAG:CheckGroupsDone` --- Moose Development/Moose/Ops/Auftrag.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index b8223d117..cae2c17c4 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -4801,6 +4801,8 @@ end -- @return #boolean If `true`, all groups are done with the mission. function AUFTRAG:CheckGroupsDone() + local fsmState = self:GetState() + -- Check status of all OPS groups. for groupname,data in pairs(self.groupdata) do local groupdata=data --#AUFTRAG.GroupData @@ -4859,7 +4861,7 @@ function AUFTRAG:CheckGroupsDone() return true end - if (self:IsStarted() or self:IsExecuting()) and self:CountOpsGroups()>0 then + if (self:IsStarted() or self:IsExecuting()) and (fsmState == AUFTRAG.Status.STARTED or fsmState == AUFTRAG.Status.EXECUTING) and self:CountOpsGroups()>0 then self:T(self.lid..string.format("CheckGroupsDone: Mission is STARTED state %s [FSM=%s] and count of alive OPSGROUP > zero. Mission NOT DONE!", self.status, self:GetState())) return false end