aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-01-12 20:53:37 +0000
committerJustin Clark-Casey (justincc)2010-01-12 20:53:37 +0000
commit1261618216198e4d3ada20b34939715ef900a618 (patch)
tree35a5606731fc48d7a66641101a11df2d7c5536c6
parentminor: add a line of documentation to the new ForwardOfflineGroupMessages [Me... (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-1261618216198e4d3ada20b34939715ef900a618.zip
opensim-SC_OLD-1261618216198e4d3ada20b34939715ef900a618.tar.gz
opensim-SC_OLD-1261618216198e4d3ada20b34939715ef900a618.tar.bz2
opensim-SC_OLD-1261618216198e4d3ada20b34939715ef900a618.tar.xz
Merge branch 'master' of ssh://justincc@opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
1 files changed, 3 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 1985e72..c9998c0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7285,23 +7285,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7285 public LSL_Integer llGetNumberOfPrims() 7285 public LSL_Integer llGetNumberOfPrims()
7286 { 7286 {
7287 m_host.AddScriptLPS(1); 7287 m_host.AddScriptLPS(1);
7288 ScenePresence[] presences = World.GetScenePresences();
7289 if (presences.Length == 0)
7290 return 0;
7291
7292 int avatarCount = 0; 7288 int avatarCount = 0;
7293 for (int i = 0; i < presences.Length; i++) 7289 World.ForEachScenePresence(delegate(ScenePresence presence)
7294 { 7290 {
7295 ScenePresence presence = presences[i]; 7291 if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
7296
7297 if (!presence.IsChildAgent && presence.ParentID != 0)
7298 {
7299 if (m_host.ParentGroup.HasChildPrim(presence.ParentID))
7300 {
7301 avatarCount++; 7292 avatarCount++;
7302 } 7293 });
7303 }
7304 }
7305 7294
7306 return m_host.ParentGroup.PrimCount + avatarCount; 7295 return m_host.ParentGroup.PrimCount + avatarCount;
7307 } 7296 }