Merge pull request 'Make player wield switch instant' (#1129) from Code-Sploit/MineClone2:master into master

Reviewed-on: MineClone2/MineClone2#1129
This commit is contained in:
Elias Fleckenstein 2021-02-16 12:40:55 +00:00
commit 98b00898a5
1 changed files with 3 additions and 7 deletions

View File

@ -74,13 +74,9 @@ minetest.register_on_joinplayer(function(player)
end, player) end, player)
end) end)
minetest.register_globalstep(function(dtime) minetest.register_globalstep(function()
time = time + dtime for _,player in ipairs(minetest.get_connected_players()) do
if time > update_time then wieldview:update_wielded_item(player)
for _,player in ipairs(minetest.get_connected_players()) do
wieldview:update_wielded_item(player)
end
time = 0
end end
end) end)