aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-04 20:56:39 +0000
committerJustin Clark-Casey (justincc)2013-01-04 20:56:39 +0000
commita3bf3a2aa5f0213d238ac31e279dd729bc872769 (patch)
treed290689e9231d3d18039cca2bb48457d22cddebe /OpenSim
parentFix llGetLinkName() to return the name of the last avatar sat as the last lin... (diff)
downloadopensim-SC-a3bf3a2aa5f0213d238ac31e279dd729bc872769.zip
opensim-SC-a3bf3a2aa5f0213d238ac31e279dd729bc872769.tar.gz
opensim-SC-a3bf3a2aa5f0213d238ac31e279dd729bc872769.tar.bz2
opensim-SC-a3bf3a2aa5f0213d238ac31e279dd729bc872769.tar.xz
refactor: simplify llGetNumberOfPrims() to return prim count + sitting avatar count rather than independently inspecting every scene presence
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
1 files changed, 1 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index f0e0f1a..14aaa86 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7891,14 +7891,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7891 public LSL_Integer llGetNumberOfPrims() 7891 public LSL_Integer llGetNumberOfPrims()
7892 { 7892 {
7893 m_host.AddScriptLPS(1); 7893 m_host.AddScriptLPS(1);
7894 int avatarCount = 0;
7895 World.ForEachRootScenePresence(delegate(ScenePresence presence)
7896 {
7897 if (presence.ParentID != 0 && m_host.ParentGroup.ContainsPart(presence.ParentID))
7898 avatarCount++;
7899 });
7900 7894
7901 return m_host.ParentGroup.PrimCount + avatarCount; 7895 return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount();
7902 } 7896 }
7903 7897
7904 /// <summary> 7898 /// <summary>