Fixes events with sleeps.

This commit is contained in:
AnturK
2017-10-01 07:33:03 -05:00
committed by KorPhaeron
parent ef5cf0e5a5
commit bb8267476f
+9
View File
@@ -157,19 +157,28 @@
return
if(activeFor == startWhen)
processing = FALSE
start()
processing = TRUE
if(activeFor == announceWhen)
processing = FALSE
announce()
processing = TRUE
if(startWhen < activeFor && activeFor < endWhen)
processing = FALSE
tick()
processing = TRUE
if(activeFor == endWhen)
processing = FALSE
end()
processing = TRUE
// Everything is done, let's clean up.
if(activeFor >= endWhen && activeFor >= announceWhen && activeFor >= startWhen)
processing = FALSE
kill()
activeFor++