#PLAYERTASK - make an existing marker move with the group if the group is moving around

This commit is contained in:
Applevangelist 2025-04-24 14:48:12 +02:00
parent 296d4b1e93
commit cdad3bd058

View File

@ -98,7 +98,7 @@ PLAYERTASK = {
--- PLAYERTASK class version. --- PLAYERTASK class version.
-- @field #string version -- @field #string version
PLAYERTASK.version="0.1.25" PLAYERTASK.version="0.1.26"
--- Generic task condition. --- Generic task condition.
-- @type PLAYERTASK.Condition -- @type PLAYERTASK.Condition
@ -979,6 +979,12 @@ function PLAYERTASK:onafterStatus(From, Event, To)
if status == "Stopped" then return self end if status == "Stopped" then return self end
-- update marker in case target is moving
if self.TargetMarker then
local coordinate = self.Target:GetCoordinate()
self.TargetMarker:UpdateCoordinate(coordinate,0.5)
end
-- Check Target status -- Check Target status
local targetdead = false local targetdead = false