Updated LimitWorld. (Patch by tonibm19)
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1642 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
f7b8a301f8
commit
504f6192f7
@ -6,16 +6,16 @@ function OnPlayerMoving( Player )
|
|||||||
local X = math.floor(Player:GetPosX() / 16)
|
local X = math.floor(Player:GetPosX() / 16)
|
||||||
local Z = math.floor(Player:GetPosZ() / 16)
|
local Z = math.floor(Player:GetPosZ() / 16)
|
||||||
if ( (SpawnX + LimitWorldWidth - 1) < X ) then
|
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
|
end
|
||||||
if ( (SpawnX - LimitWorldWidth + 1) > X ) then
|
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
|
end
|
||||||
if ( (SpawnZ + LimitWorldWidth - 1) < Z ) then
|
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
|
||||||
if ( (SpawnZ - LimitWorldWidth + 1) > Z ) then
|
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
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user