mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
First prototype of the scheduler dispatcher is ready... It works, but the code was very difficult...
So, when the Scheduler that is passed to the AddScheduler is nillified, the internal arrays that keep the Scheduler reference are also nillified. And it does what i need for further utilization in MOOSE classes. When the Scheduler is nillified, but, a schedule was planned for that Scheduler, once the scheduler fires off, it will ignore that call... cool. Sven
This commit is contained in:
@@ -31,6 +31,7 @@ Mission:AddScoring( Scoring )
|
||||
|
||||
-- Define the set of group of planes that can be assigned to the Mission object.
|
||||
local SEADSet = SET_GROUP:New():FilterPrefixes( "Test SEAD"):FilterStart()
|
||||
SEADSet:Flush()
|
||||
|
||||
-- Define the set of units that are the targets.
|
||||
-- Note that I use FilterOnce, which means that the set will be defined only once,
|
||||
@@ -132,9 +133,11 @@ function FsmSEADTemplate:onenterUpdated( TaskUnit )
|
||||
end
|
||||
|
||||
|
||||
--local TaskSEAD2 = TASK_BASE:New( Mission, SEADSet, "SEAD Radars Vector 2", "SEAD" ) -- Tasking.Task#TASK_BASE
|
||||
--TaskSEAD2:SetFsmTemplate( TaskSEAD:GetFsmTemplate():Copy() )
|
||||
--Mission:AddTask( TaskSEAD2 )
|
||||
local TaskSEAD2 = TASK_BASE:New( Mission, SEADSet, "SEAD Radars Vector 2", "SEAD" ) -- Tasking.Task#TASK_BASE
|
||||
TaskSEAD2:SetFsmTemplate( TaskSEAD:GetFsmTemplate():Copy() )
|
||||
Mission:AddTask( TaskSEAD2 )
|
||||
|
||||
Mission:RemoveTask(TaskSEAD)
|
||||
|
||||
TaskSEAD = nil
|
||||
FsmSEADTemplate = nil
|
||||
|
||||
Reference in New Issue
Block a user