Fixed bug

This commit is contained in:
Billy S 2018-12-23 16:13:05 -05:00 committed by GitHub
parent a2c9cad39d
commit afb7bb7b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ local function step()
for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local info = minetest.get_player_information(name)
if info ~= nil then
-- 2.0 seconds.
if info.avg_jitter > 2.0 and not players_glitching[name] then
players_glitching[name] = player:get_pos()
@ -19,6 +20,7 @@ local function step()
minetest.after(0.5, function() players_glitching[name] = nil end)
end
end
end
minetest.after(1, step)
end