]> git.lizzy.rs Git - dragonblocks3d-lua.git/blobdiff - src/taskmgr.lua
Dynamic World System
[dragonblocks3d-lua.git] / src / taskmgr.lua
index 4c4693e6d3ba50920c4379c4224c4dad80622c80..91e5aef256b32984a10f6af151945935c039090d 100644 (file)
@@ -11,11 +11,7 @@ function Dragonblocks:step()
        local tasks = self.tasks
        self.tasks = {}
        for _, t in ipairs(tasks) do
-               local continue, status = coroutine.resume(t)
-               if status then
-                       print(status)
-               end
-               if continue then
+               if coroutine.status(t) ~= "dead" and coroutine.resume(t) then
                        table.insert(self.tasks, t)
                end
        end