From 9cbfaf012e365e0cb88609aebf61ea0e21ec47e6 Mon Sep 17 00:00:00 2001 From: Code-Sploit Date: Tue, 16 Feb 2021 12:34:26 +0000 Subject: [PATCH] Make player wield switch instant --- mods/PLAYER/wieldview/init.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mods/PLAYER/wieldview/init.lua b/mods/PLAYER/wieldview/init.lua index 7835cc38f3..dab577fa86 100644 --- a/mods/PLAYER/wieldview/init.lua +++ b/mods/PLAYER/wieldview/init.lua @@ -74,13 +74,9 @@ minetest.register_on_joinplayer(function(player) end, player) end) -minetest.register_globalstep(function(dtime) - time = time + dtime - if time > update_time then - for _,player in ipairs(minetest.get_connected_players()) do - wieldview:update_wielded_item(player) - end - time = 0 +minetest.register_globalstep(function() + for _,player in ipairs(minetest.get_connected_players()) do + wieldview:update_wielded_item(player) end end)