Added osGetRegionStats() function, to return a number of sim statistics

This commit is contained in:
Jeff Lee
2009-11-22 18:10:46 -05:00
committed by Melanie
parent c6bfecccaa
commit d39c300d11
7 changed files with 61 additions and 0 deletions

View File

@@ -5784,6 +5784,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
return World.SimulatorFPS;
}
/* particle system rules should be coming into this routine as doubles, that is
rule[0] should be an integer from this list and rule[1] should be the arg

View File

@@ -1948,5 +1948,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return key.ToString();
}
public LSL_List osGetRegionStats()
{
CheckThreatLevel(ThreatLevel.High, "osGetRegionStats");
m_host.AddScriptLPS(1);
LSL_List ret = new LSL_List();
float[] stats = World.SimulatorStats;
for (int i = 0; i < 21; i++)
{
ret.Add(new LSL_Float( stats[i] ));
}
return ret;
}
}
}