add antilag mod
from appguru
This commit is contained in:
parent
eaae854338
commit
b86c207390
13
mods/antilag/init.lua
Normal file
13
mods/antilag/init.lua
Normal file
@ -0,0 +1,13 @@
|
||||
local min_lag = 1 -- in seconds
|
||||
local min_times = 10 -- has to occur 10x
|
||||
local times = 0
|
||||
minetest.register_globalstep(function(lag)
|
||||
if lag < min_lag then
|
||||
times = 0
|
||||
else
|
||||
times = times + 1
|
||||
if times >= min_times then
|
||||
minetest.request_shutdown("Server shutting down due to high latency (lag).")
|
||||
end
|
||||
end
|
||||
end)
|
Loading…
x
Reference in New Issue
Block a user