mirror of
https://github.com/opensim/opensim.git
synced 2026-07-07 21:25:47 +08:00
Count agents for LSL instead of relying on SceneGraph to have the correct
value. Fixes a reported glitch.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user