mirror of
https://github.com/minetest/minetest.git
synced 2024-08-19 04:54:18 +02:00
Free arguments of cancelled minetest.after() jobs
This commit is contained in:
parent
7c321ad7f5
commit
4f6f09590c
@ -37,7 +37,14 @@ function core.after(after, func, ...)
|
||||
arg = {...},
|
||||
mod_origin = core.get_last_run_mod(),
|
||||
}
|
||||
|
||||
jobs[#jobs + 1] = new_job
|
||||
time_next = math.min(time_next, expire)
|
||||
return { cancel = function() new_job.func = function() end end }
|
||||
|
||||
return {
|
||||
cancel = function()
|
||||
new_job.func = function() end
|
||||
new_job.args = {}
|
||||
end
|
||||
}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user