Support for spawn and beds mod respawns (when area might take some time to load)

master
AndrejIT 2021-08-23 14:08:10 +03:00
parent 69ea1a3515
commit 88a52e9b24
1 changed files with 10 additions and 0 deletions

View File

@ -139,6 +139,16 @@ minimal_anticheat.check_cheater_on_air = function ()
end
end
if vector.distance({x=0, y=0, z=0}, pos) < 3 then
near_teleport_or_spawn = true
end
if _G["beds"] and beds.spawn and beds.spawn[name] ~= nil then
if vector.distance(beds.spawn[name], pos) < 3 then
near_teleport_or_spawn = true
end
end
if near_teleport_or_spawn then
minetest.chat_send_all("Player "..name.." had teleportation accident");
minetest.log("action", "Player "..name.." at "..minetest.pos_to_string(vector.round(pos)).." not suspected in fly cheat");