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:
FlightControl
2016-12-12 16:44:56 +01:00
parent 24a6d37500
commit b81b483f0b
17 changed files with 481 additions and 174 deletions

View File

@@ -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