mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 03:23:45 +01: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 = {...},
|
arg = {...},
|
||||||
mod_origin = core.get_last_run_mod(),
|
mod_origin = core.get_last_run_mod(),
|
||||||
}
|
}
|
||||||
|
|
||||||
jobs[#jobs + 1] = new_job
|
jobs[#jobs + 1] = new_job
|
||||||
time_next = math.min(time_next, expire)
|
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
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user