refactor: have lsl and ossl interrogate scene.StatsReporter directly rather than going through scene

I know this goes against the law of demeter but I don't think it's that useful here and I'd rather get rid of nasty little wrapper methods
0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-10 21:54:08 +01:00
parent 579aa9c6a0
commit 21e3f8e53a
3 changed files with 2 additions and 15 deletions

View File

@ -513,19 +513,6 @@ namespace OpenSim.Region.Framework.Scenes
get { return m_sceneGraph.m_syncRoot; }
}
/// <summary>
/// This is for llGetRegionFPS
/// </summary>
public float SimulatorFPS
{
get { return StatsReporter.getLastReportedSimFPS(); }
}
public float[] SimulatorStats
{
get { return StatsReporter.getLastReportedSimStats(); }
}
public string DefaultScriptEngine
{
get { return m_defaultScriptEngine; }

View File

@ -5926,7 +5926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Float llGetRegionFPS()
{
m_host.AddScriptLPS(1);
return World.SimulatorFPS;
return World.StatsReporter.getLastReportedSimFPS();
}

View File

@ -2462,7 +2462,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats");
m_host.AddScriptLPS(1);
LSL_List ret = new LSL_List();
float[] stats = World.SimulatorStats;
float[] stats = World.StatsReporter.getLastReportedSimStats();
for (int i = 0; i < 21; i++)
{