Increase check_time, add message
parent
7fded4fca9
commit
d80001a698
6
init.lua
6
init.lua
|
@ -1,7 +1,8 @@
|
||||||
--Protection Lag Teleporter
|
--Protection Lag Teleporter
|
||||||
|
|
||||||
local check_speed = 0.2 --Teleport this quickly.
|
local check_speed = 0.2 --Teleport this quickly.
|
||||||
local check_time = 3 --Test this many times before finishing.
|
local check_time = 6 --Test this many times before finishing.
|
||||||
|
local message = true --Send a message when done teleporting. This is useful with high check_time values.
|
||||||
|
|
||||||
protection_lagporter = {}
|
protection_lagporter = {}
|
||||||
protection_lagporter.glitching = {} --Check if a player is being teleported with: if protection_lagporter.glitching[playername] then ... end
|
protection_lagporter.glitching = {} --Check if a player is being teleported with: if protection_lagporter.glitching[playername] then ... end
|
||||||
|
@ -26,6 +27,9 @@ local function check_togo(name)
|
||||||
togo[name] = nil
|
togo[name] = nil
|
||||||
times[name] = nil
|
times[name] = nil
|
||||||
protection_lagporter.glitching[name] = nil
|
protection_lagporter.glitching[name] = nil
|
||||||
|
if message then
|
||||||
|
minetest.chat_send_player(name, "You may now move.")
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
--Teleport and retry.
|
--Teleport and retry.
|
||||||
|
|
Loading…
Reference in New Issue