diff options
author | BlueWall | 2011-04-21 19:08:31 -0400 |
---|---|---|
committer | BlueWall | 2011-04-21 19:08:31 -0400 |
commit | cbe49ed917aaef44b5811949bd50e6c6d74c3188 (patch) | |
tree | 53e2eae095e9744729a46f5bb6fe4db5e53eded9 | |
parent | fix merge conflicts with OpenSimDefaults.ini (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-cbe49ed917aaef44b5811949bd50e6c6d74c3188.zip opensim-SC-cbe49ed917aaef44b5811949bd50e6c6d74c3188.tar.gz opensim-SC-cbe49ed917aaef44b5811949bd50e6c6d74c3188.tar.bz2 opensim-SC-cbe49ed917aaef44b5811949bd50e6c6d74c3188.tar.xz |
Merge branch 'master' of /home/opensim/var/repo/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 |
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index fdd5205..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) |
@@ -4966,6 +4975,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
4966 | // child agent creation, thereby emulating the SL behavior. | 4975 | // child agent creation, thereby emulating the SL behavior. |
4967 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) | 4976 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) |
4968 | { | 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 | |||
4969 | reason = String.Empty; | 4989 | reason = String.Empty; |
4970 | return true; | 4990 | return true; |
4971 | } | 4991 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 72f0402..fc31b65 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -800,6 +800,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
800 | return m_scenePresenceArray; | 800 | return m_scenePresenceArray; |
801 | } | 801 | } |
802 | 802 | ||
803 | public int GetNumberOfScenePresences() | ||
804 | { | ||
805 | return m_scenePresenceArray.Count; | ||
806 | } | ||
807 | |||
803 | /// <summary> | 808 | /// <summary> |
804 | /// Request a scene presence by UUID. Fast, indexed lookup. | 809 | /// Request a scene presence by UUID. Fast, indexed lookup. |
805 | /// </summary> | 810 | /// </summary> |