Reduce random AFK offset to from 5 nodes to 1 node

master
Wuzzy 2020-09-08 21:05:07 +02:00
parent e615a3794b
commit 0a926f429a
1 changed files with 3 additions and 1 deletions

View File

@ -124,7 +124,9 @@ function teleports.teleportate(parameters)
teleports.lastplayername = playername
player:setpos({x=pos2.x,y=pos2.y+0.5,z=pos2.z})
else
player:setpos({x=pos2.x-5+math.random(1, 10),y=pos2.y+3,z=pos2.z-5+math.random(1, 10)})
-- Small chance to "miss" destiation by 1 node horizontally to prevent afk players
-- from teleporting forever
player:setpos({x=pos2.x-2+math.random(1, 3),y=pos2.y+0.5,z=pos2.z-2+math.random(1, 3)})
end
end
end