From 004b395d12b4e369005a4f4a0a44a86bd278e781 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 21 Oct 2010 15:36:32 +0100 Subject: Make SImStatsReporter pick ObjectCapacity striaght out of region info --- OpenSim/Region/Framework/Scenes/Scene.cs | 2 -- OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 0cfc235..c9ae558 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -599,8 +599,6 @@ namespace OpenSim.Region.Framework.Scenes StatsReporter.OnSendStatsResult += SendSimStatsPackets; StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; - StatsReporter.SetObjectCapacity(RegionInfo.ObjectCapacity); - // Old /* m_simulatorVersion = simulatorVersion diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index fd23294..87dcdee 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -108,7 +108,7 @@ namespace OpenSim.Region.Framework.Scenes private int m_activeScripts = 0; private int m_scriptLinesPerSecond = 0; - private int objectCapacity = 45000; + private int m_objectCapacity = 45000; private Scene m_scene; @@ -124,6 +124,7 @@ namespace OpenSim.Region.Framework.Scenes m_scene = scene; ReportingRegion = scene.RegionInfo; + m_objectCapacity = scene.RegionInfo.ObjectCapacity; m_report.AutoReset = true; m_report.Interval = statsUpdatesEveryMS; m_report.Elapsed += new ElapsedEventHandler(statsHeartBeat); @@ -271,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes SimStats simStats = new SimStats( - ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID); + ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID); handlerSendStatResult = OnSendStatsResult; if (handlerSendStatResult != null) @@ -435,11 +436,6 @@ namespace OpenSim.Region.Framework.Scenes m_activeScripts = count; } - public void SetObjectCapacity(int objects) - { - objectCapacity = objects; - } - /// /// This is for llGetRegionFPS /// -- cgit v1.1