From 504f6192f77a6ba79731cb56ded63fd2fbf76ab7 Mon Sep 17 00:00:00 2001 From: "nielsbreu@gmail.com" Date: Wed, 3 Jul 2013 08:13:53 +0000 Subject: Updated LimitWorld. (Patch by tonibm19) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1642 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- MCServer/Plugins/Core/onplayermoving.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MCServer/Plugins/Core/onplayermoving.lua b/MCServer/Plugins/Core/onplayermoving.lua index a3a188894..c95eb0c5a 100644 --- a/MCServer/Plugins/Core/onplayermoving.lua +++ b/MCServer/Plugins/Core/onplayermoving.lua @@ -6,16 +6,16 @@ function OnPlayerMoving( Player ) local X = math.floor(Player:GetPosX() / 16) local Z = math.floor(Player:GetPosZ() / 16) if ( (SpawnX + LimitWorldWidth - 1) < X ) then - Player:TeleportTo(Player:GetPosX() - 1, Player:GetPosY(), Player:GetPosZ()) + Player:TeleportToCoords(Player:GetPosX() - 1, Player:GetPosY(), Player:GetPosZ()) end if ( (SpawnX - LimitWorldWidth + 1) > X ) then - Player:TeleportTo(Player:GetPosX() + 1, Player:GetPosY(), Player:GetPosZ()) + Player:TeleportToCoords(Player:GetPosX() + 1, Player:GetPosY(), Player:GetPosZ()) end if ( (SpawnZ + LimitWorldWidth - 1) < Z ) then - Player:TeleportTo(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() - 1) + Player:TeleportToCoords(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() - 1) end if ( (SpawnZ - LimitWorldWidth + 1) > Z ) then - Player:TeleportTo(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() + 1) + Player:TeleportToCoords(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ() + 1) end end end \ No newline at end of file -- cgit v1.2.3