From 3460319f1e4eab5529df83f9c873a14df414d525 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 3 Aug 2012 02:20:57 +0200 Subject: Make sure the position of a loggin-in agent is within region boundaries since out of bounds positions cause a rejection of the login. --- OpenSim/Region/Framework/Scenes/Scene.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3a28d42..bf2db58 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3886,6 +3886,15 @@ namespace OpenSim.Region.Framework.Scenes public bool TestLandRestrictions(UUID agentID, out string reason, ref float posX, ref float posY) { + if (posX < 0) + posX = 0; + else if (posX >= 256) + posX = 255.999f; + if (posY < 0) + posY = 0; + else if (posY >= 256) + posY = 255.999f; + reason = String.Empty; if (Permissions.IsGod(agentID)) return true; -- cgit v1.1