aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-04 20:56:39 +0000
committerJustin Clark-Casey (justincc)2013-01-04 21:50:14 +0000
commitebfcb9d4e44bbdf148aa25d8adb10db01c9aa7e5 (patch)
treec23572506a0b4ff6896d12d8cb4e79dc584ec2a4 /OpenSim/Region/ScriptEngine/Shared
parentFix llGetLinkName() to return the name of the last avatar sat as the last lin... (diff)
downloadopensim-SC_OLD-ebfcb9d4e44bbdf148aa25d8adb10db01c9aa7e5.zip
opensim-SC_OLD-ebfcb9d4e44bbdf148aa25d8adb10db01c9aa7e5.tar.gz
opensim-SC_OLD-ebfcb9d4e44bbdf148aa25d8adb10db01c9aa7e5.tar.bz2
opensim-SC_OLD-ebfcb9d4e44bbdf148aa25d8adb10db01c9aa7e5.tar.xz
refactor: simplify llGetNumberOfPrims() to return prim count + sitting avatar count rather than independently inspecting every scene presence
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-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>