mirror of
https://github.com/appgurueu/modlib.git
synced 2024-08-20 13:24:11 +02:00
Merge branch 'master' of https://github.com/appgurueu/modlib
This commit is contained in:
commit
a0efa59030
@ -33,14 +33,13 @@ local function get_gametime_init(dtime)
|
|||||||
end
|
end
|
||||||
for index, globalstep in pairs(minetest.registered_globalsteps) do
|
for index, globalstep in pairs(minetest.registered_globalsteps) do
|
||||||
if globalstep == get_gametime_init then
|
if globalstep == get_gametime_init then
|
||||||
table.remove(minetest.registered_globalsteps, index)
|
-- globalsteps of mods which depend on modlib will execute after this
|
||||||
|
minetest.registered_globalsteps[index] = function(dtime)
|
||||||
|
gametime = gametime + dtime
|
||||||
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- globalsteps of mods which depend on modlib will execute after this
|
|
||||||
minetest.register_globalstep(function(dtime)
|
|
||||||
gametime = gametime + dtime
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
minetest.register_globalstep(get_gametime_init)
|
minetest.register_globalstep(get_gametime_init)
|
||||||
|
|
||||||
@ -200,4 +199,4 @@ function nodename_matcher(node_or_groupname)
|
|||||||
return nodename == node_or_groupname
|
return nodename == node_or_groupname
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user