Count agents for LSL instead of relying on SceneGraph to have the correct

value. Fixes a reported glitch.
avinationmerge
Melanie 2012-02-22 23:14:29 +01:00
parent 1e1270166f
commit 3796e08b59
1 changed files with 7 additions and 1 deletions

View File

@ -5709,7 +5709,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Integer llGetRegionAgentCount()
{
m_host.AddScriptLPS(1);
return new LSL_Integer(World.GetRootAgentCount());
int count = 0;
World.ForEachRootScenePresence(delegate(ScenePresence sp) {
count++;
});
return new LSL_Integer(count);
}
public LSL_Vector llGetRegionCorner()