summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index a8159c5..188fc58 100644
--- a/init.lua
+++ b/init.lua
@@ -234,7 +234,14 @@ minetest.register_on_joinplayer(function(player)
end
end)
-minetest.register_globalstep(function()
+playereffects.globalstep_timer = 0
+minetest.register_globalstep(function(dtime)
+ playereffects.globalstep_timer = playereffects.globalstep_timer + dtime
+ if(playereffects.globalstep_timer < 1) then
+ return
+ end
+ playereffects.globalstep_timer = 0
+
local players = minetest.get_connected_players()
for p=1,#players do
playereffects.hud_update(players[p])