From 0d1b8675004a37c1a5590a6825b5204b08e285e6 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 6 Jan 2009 00:07:24 +0000 Subject: * Added a way for the sim stats reporter to say to the scene that the stats are illogical. --- OpenSim/Region/Environment/Scenes/SceneGraph.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneGraph.cs b/OpenSim/Region/Environment/Scenes/SceneGraph.cs index 3ffa5c3..8476344 100644 --- a/OpenSim/Region/Environment/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Environment/Scenes/SceneGraph.cs @@ -694,6 +694,24 @@ namespace OpenSim.Region.Environment.Scenes } } + public void RecalculateStats() + { + List SPList = GetScenePresences(); + int rootcount = 0; + int childcount = 0; + + foreach (ScenePresence user in SPList) + { + if (user.IsChildAgent) + childcount++; + else + rootcount++; + } + m_numRootAgents = rootcount; + m_numChildAgents = childcount; + + } + public int GetChildAgentCount() { // some network situations come in where child agents get closed twice. @@ -1748,5 +1766,7 @@ namespace OpenSim.Region.Environment.Scenes } #endregion + + } } -- cgit v1.1