From f34cc6b46949033803c79235b9d82da9bf9634dd Mon Sep 17 00:00:00 2001 From: Thomas Grimshaw Date: Mon, 5 Apr 2010 22:08:34 +0200 Subject: Add a much cheaper agent count retrieval method. This is obsoleted by 0.7 so it can be reverted then. --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (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 ab0d397..e5e6fc9 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1523,7 +1523,7 @@ namespace OpenSim.Region.Framework.Scenes public void SaveTerrain() { m_storageManager.DataStore.StoreTerrain(Heightmap.GetDoubles(), RegionInfo.RegionID); - } + } public void StoreWindlightProfile(RegionMeta7WindlightData wl) { @@ -4339,6 +4339,14 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// Cheaply return the number of avatars in a region (without fetching a list object) + /// + public int GetRootAgentCount() + { + return m_sceneGraph.GetRootAgentCount(); + } + + /// /// Return a list of all ScenePresences in this region. This returns child agents as well as root agents. /// This list is a new object, so it can be iterated over without locking. /// -- cgit v1.1