Count agents for LSL instead of relying on SceneGraph to have the correct
value. Fixes a reported glitch.avinationmerge
parent
1e1270166f
commit
3796e08b59
|
@ -5709,7 +5709,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Integer llGetRegionAgentCount()
|
public LSL_Integer llGetRegionAgentCount()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
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()
|
public LSL_Vector llGetRegionCorner()
|
||||||
|
|
Loading…
Reference in New Issue