aboutsummaryrefslogtreecommitdiff
path: root/src/client/clientlauncher.cpp
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-28 10:53:36 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commite0716384d6c7abfa228b039056f1e872ca7bb8cf (patch)
tree78a6393bdbd7f5ea7e6b67d3b62c10595235949d /src/client/clientlauncher.cpp
parente34d28af9f4b779b7a137f0e4017e499266e1931 (diff)
downloadminetest-e0716384d6c7abfa228b039056f1e872ca7bb8cf.tar.gz
minetest-e0716384d6c7abfa228b039056f1e872ca7bb8cf.tar.bz2
minetest-e0716384d6c7abfa228b039056f1e872ca7bb8cf.zip
refacto: add RenderingEngine::cleanupMeshCache
This permits to prevent client to own the mesh cache cleanup logic. It's better in RenderingEngine
Diffstat (limited to 'src/client/clientlauncher.cpp')
0 files changed, 0 insertions, 0 deletions
f='#n126'>126 127 128 129 130 131 132 133 134 135 136 137 138
-- Minetest: builtin/misc.lua

--
-- Misc. API functions
--

core.timers_to_add = {}
core.timers = {}
core.register_globalstep(function(dtime)
	for _, timer in ipairs(core.timers_to_add) do
		table.insert(core.timers, timer)
	end
	core.timers_to_add = {}
	local index = 1
	while index <= #core.timers do
		local timer = core.timers[index]
		timer.time = timer.time - dtime
		if timer.time <= 0 then
			timer.func(unpack(timer.args or {}))
			table.remove(core.timers,index)
		else
			index = index + 1
		end
	end
end)

function core.after(time, func, ...)
	assert(tonumber(time) and type(func) == "function",