forked from Mirrorlandia_minetest/minetest
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