diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f0acc38..01de824 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3665,6 +3665,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
3665 | return false; | 3665 | return false; |
3666 | } | 3666 | } |
3667 | 3667 | ||
3668 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
3669 | |||
3670 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
3671 | { | ||
3672 | if (!Permissions.IsAdministrator(cAgentData.AgentID)) | ||
3673 | return false; | ||
3674 | } | ||
3675 | |||
3676 | |||
3668 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3677 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3669 | 3678 | ||
3670 | if (childAgentUpdate != null) | 3679 | if (childAgentUpdate != null) |
@@ -4839,7 +4848,20 @@ namespace OpenSim.Region.Framework.Scenes | |||
4839 | } | 4848 | } |
4840 | } | 4849 | } |
4841 | 4850 | ||
4842 | public Vector3[] GetCombinedBoundingBox(List<SceneObjectGroup> objects, out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ) | 4851 | /// <summary> |
4852 | /// Get the volume of space that will encompass all the given objects. | ||
4853 | /// </summary> | ||
4854 | /// <param name="objects"></param> | ||
4855 | /// <param name="minX"></param> | ||
4856 | /// <param name="maxX"></param> | ||
4857 | /// <param name="minY"></param> | ||
4858 | /// <param name="maxY"></param> | ||
4859 | /// <param name="minZ"></param> | ||
4860 | /// <param name="maxZ"></param> | ||
4861 | /// <returns></returns> | ||
4862 | public static Vector3[] GetCombinedBoundingBox( | ||
4863 | List<SceneObjectGroup> objects, | ||
4864 | out float minX, out float maxX, out float minY, out float maxY, out float minZ, out float maxZ) | ||
4843 | { | 4865 | { |
4844 | minX = 256; | 4866 | minX = 256; |
4845 | maxX = -256; | 4867 | maxX = -256; |
@@ -4857,6 +4879,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4857 | Vector3 vec = g.AbsolutePosition; | 4879 | Vector3 vec = g.AbsolutePosition; |
4858 | 4880 | ||
4859 | g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); | 4881 | g.GetAxisAlignedBoundingBoxRaw(out ominX, out omaxX, out ominY, out omaxY, out ominZ, out omaxZ); |
4882 | |||
4883 | // m_log.DebugFormat( | ||
4884 | // "[SCENE]: For {0} found AxisAlignedBoundingBoxRaw {1}, {2}", | ||
4885 | // g.Name, new Vector3(ominX, ominY, ominZ), new Vector3(omaxX, omaxY, omaxZ)); | ||
4860 | 4886 | ||
4861 | ominX += vec.X; | 4887 | ominX += vec.X; |
4862 | omaxX += vec.X; | 4888 | omaxX += vec.X; |
@@ -4949,6 +4975,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
4949 | // child agent creation, thereby emulating the SL behavior. | 4975 | // child agent creation, thereby emulating the SL behavior. |
4950 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) | 4976 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) |
4951 | { | 4977 | { |
4978 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
4979 | |||
4980 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
4981 | { | ||
4982 | if (!Permissions.IsAdministrator(agentID)) | ||
4983 | { | ||
4984 | reason = "The region is full"; | ||
4985 | return false; | ||
4986 | } | ||
4987 | } | ||
4988 | |||
4952 | reason = String.Empty; | 4989 | reason = String.Empty; |
4953 | return true; | 4990 | return true; |
4954 | } | 4991 | } |