mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Added osGetRegionStats() function, to return a number of sim statistics
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user