Fixed bug
This commit is contained in:
parent
a2c9cad39d
commit
afb7bb7b9c
@ -12,11 +12,13 @@ local function step()
|
|||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local info = minetest.get_player_information(name)
|
local info = minetest.get_player_information(name)
|
||||||
-- 2.0 seconds.
|
if info ~= nil then
|
||||||
if info.avg_jitter > 2.0 and not players_glitching[name] then
|
-- 2.0 seconds.
|
||||||
players_glitching[name] = player:get_pos()
|
if info.avg_jitter > 2.0 and not players_glitching[name] then
|
||||||
elseif info.avg_jitter < 2.0 and players_glitching[name] then
|
players_glitching[name] = player:get_pos()
|
||||||
minetest.after(0.5, function() players_glitching[name] = nil end)
|
elseif info.avg_jitter < 2.0 and players_glitching[name] then
|
||||||
|
minetest.after(0.5, function() players_glitching[name] = nil end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
minetest.after(1, step)
|
minetest.after(1, step)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user