diff --git a/Moose Development/Moose/Ops/Auftrag.lua b/Moose Development/Moose/Ops/Auftrag.lua index c05fa5a4c..52904d0ec 100644 --- a/Moose Development/Moose/Ops/Auftrag.lua +++ b/Moose Development/Moose/Ops/Auftrag.lua @@ -6075,20 +6075,15 @@ function AUFTRAG:GetDCSMissionTask() -- Race-track vector. orbitRaceTrack=UTILS.Vec2Translate(orbitVec2, self.orbitLeg, heading) end - - -- Debug - --UTILS.RemoveMark(self.orbitCenterMarkID) - --self.orbitCenterMarkID=COORDINATE:NewFromVec2(orbitVec2):MarkToAll("Orbit Center") - - -- Debug show arrow. - --if orbitRaceTrack then - --UTILS.RemoveMark(self.orbitArrowMarkID) - --self.orbitArrowMarkID=COORDINATE:NewFromVec2(orbitVec2):ArrowToAll(COORDINATE:NewFromVec2(orbitRaceTrack)) - --end + + local orbitRaceTrackCoord = nil + if orbitRaceTrack then + orbitRaceTrackCoord = COORDINATE:NewFromVec2(orbitRaceTrack) + end -- Create orbit task. - local DCStask=CONTROLLABLE.TaskOrbit(nil, COORDINATE:NewFromVec2(orbitVec2), self.orbitAltitude, self.orbitSpeed, COORDINATE:NewFromVec2(orbitRaceTrack)) - + local DCStask=CONTROLLABLE.TaskOrbit(nil, COORDINATE:NewFromVec2(orbitVec2), self.orbitAltitude, self.orbitSpeed, orbitRaceTrackCoord) + -- Add DCS task. table.insert(DCStasks, DCStask) diff --git a/Moose Development/Moose/Ops/PlayerTask.lua b/Moose Development/Moose/Ops/PlayerTask.lua index 08468cb48..3485cd4c1 100644 --- a/Moose Development/Moose/Ops/PlayerTask.lua +++ b/Moose Development/Moose/Ops/PlayerTask.lua @@ -96,7 +96,7 @@ PLAYERTASK = { --- PLAYERTASK class version. -- @field #string version -PLAYERTASK.version="0.1.10" +PLAYERTASK.version="0.1.11" --- Generic task condition. -- @type PLAYERTASK.Condition @@ -285,6 +285,14 @@ function PLAYERTASK:GetCoalition() return self.coalition end +--- [User] Get the Ops.Target#TARGET object for this task +-- @param #PLAYERTASK self +-- @return Ops.Target#TARGET Target +function PLAYERTASK:GetTarget() + self:T(self.lid.."GetTarget") + return self.Target +end + --- [USER] Add a free text description to this task. -- @param #PLAYERTASK self -- @param #string Text