diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 240d33c..e835281 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3856,6 +3856,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3856 | 3856 | ||
3857 | // We have to wait until the viewer contacts this region after receiving EAC. | 3857 | // We have to wait until the viewer contacts this region after receiving EAC. |
3858 | // That calls AddNewClient, which finally creates the ScenePresence | 3858 | // That calls AddNewClient, which finally creates the ScenePresence |
3859 | int num = m_sceneGraph.GetNumberOfScenePresences(); | ||
3860 | |||
3861 | if (num >= RegionInfo.RegionSettings.AgentLimit) | ||
3862 | { | ||
3863 | if (!Permissions.IsAdministrator(cAgentData.AgentID)) | ||
3864 | return false; | ||
3865 | } | ||
3866 | |||
3859 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); | 3867 | ScenePresence childAgentUpdate = WaitGetScenePresence(cAgentData.AgentID); |
3860 | if (childAgentUpdate != null) | 3868 | if (childAgentUpdate != null) |
3861 | { | 3869 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index b61aed5..1163ebf 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -826,6 +826,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
826 | return m_scenePresenceArray; | 826 | return m_scenePresenceArray; |
827 | } | 827 | } |
828 | 828 | ||
829 | public int GetNumberOfScenePresences() | ||
830 | { | ||
831 | return m_scenePresenceArray.Count; | ||
832 | } | ||
833 | |||
829 | /// <summary> | 834 | /// <summary> |
830 | /// Request a scene presence by UUID. Fast, indexed lookup. | 835 | /// Request a scene presence by UUID. Fast, indexed lookup. |
831 | /// </summary> | 836 | /// </summary> |