Fixed respawn bug in AI_BALANCER + Scheduler bug

AI_BALANCER respawns back the AI. Bug was in the FSM. In a transition,
when states are the same, the events SHOULD execute.
Added spawn delay interval option API SetSpawnInterval().
Bug that prevented AI_BALANCER to start if multiple AI_BALANCERs is also
fixed.
Fixed bug in scheduler dispatcher. Multiple schedules for the same
scheduler work now too!
This commit is contained in:
FlightControl
2017-01-08 03:53:05 +01:00
parent 243f33764a
commit 1f90c0c766
9 changed files with 113 additions and 14 deletions

View File

@@ -582,10 +582,10 @@ do -- FSM
if execute then
-- only execute the call if the From state is not equal to the To state! Otherwise this function should never execute!
if from ~= to then
--if from ~= to then
self:_call_handler("onenter" .. to, params)
self:_call_handler("OnEnter" .. to, params)
end
--end
self:_call_handler("onafter" .. EventName, params)
self:_call_handler("OnAfter" .. EventName, params)