From b63be6dd28e26d125087d87c15b26a7e547e3683 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 7 Nov 2022 17:39:11 +0100 Subject: [PATCH] #PLAYERTASK * Fix #1826 CTLD/CSAR closing immediately --- Moose Development/Moose/Ops/PlayerTask.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Ops/PlayerTask.lua b/Moose Development/Moose/Ops/PlayerTask.lua index e98bcf67b..3bb7927f4 100644 --- a/Moose Development/Moose/Ops/PlayerTask.lua +++ b/Moose Development/Moose/Ops/PlayerTask.lua @@ -21,7 +21,7 @@ -- === -- @module Ops.PlayerTask -- @image OPS_PlayerTask.jpg --- @date Last Update October 2022 +-- @date Last Update November 2022 do @@ -95,7 +95,7 @@ PLAYERTASK = { --- PLAYERTASK class version. -- @field #string version -PLAYERTASK.version="0.1.9" +PLAYERTASK.version="0.1.10" --- Generic task condition. -- @type PLAYERTASK.Condition @@ -654,11 +654,14 @@ function PLAYERTASK:onafterStatus(From, Event, To) -- Check Target status local targetdead = false - if self.Target:IsDead() or self.Target:IsDestroyed() or self.Target:CountTargets() == 0 then - targetdead = true - self:__Success(-2) - status = "Success" - return self + + if self.Type ~= AUFTRAG.Type.CTLD and self.Type ~= AUFTRAG.Type.CSAR then + if self.Target:IsDead() or self.Target:IsDestroyed() or self.Target:CountTargets() == 0 then + targetdead = true + self:__Success(-2) + status = "Success" + return self + end end if status == "Executing" then