diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5717086..94b9d40 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3988,7 +3988,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3988 | if (linknum > m_host.ParentGroup.PrimCount || (linknum == 1 && m_host.ParentGroup.PrimCount == 1)) | 3988 | if (linknum > m_host.ParentGroup.PrimCount || (linknum == 1 && m_host.ParentGroup.PrimCount == 1)) |
3989 | { | 3989 | { |
3990 | linknum -= (m_host.ParentGroup.PrimCount) + 1; | 3990 | linknum -= (m_host.ParentGroup.PrimCount) + 1; |
3991 | if (linknum > 0) linknum--; //for linksets | ||
3992 | 3991 | ||
3993 | List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET); | 3992 | List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET); |
3994 | if (avatars.Count > linknum) | 3993 | if (avatars.Count > linknum) |
@@ -7820,13 +7819,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7820 | public LSL_Integer llGetNumberOfPrims() | 7819 | public LSL_Integer llGetNumberOfPrims() |
7821 | { | 7820 | { |
7822 | m_host.AddScriptLPS(1); | 7821 | m_host.AddScriptLPS(1); |
7823 | int avatarCount = 0; | 7822 | int avatarCount = m_host.ParentGroup.GetLinkedAvatars().Count; |
7824 | World.ForEachScenePresence(delegate(ScenePresence presence) | 7823 | |
7825 | { | ||
7826 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | ||
7827 | avatarCount++; | ||
7828 | }); | ||
7829 | |||
7830 | return m_host.ParentGroup.PrimCount + avatarCount; | 7824 | return m_host.ParentGroup.PrimCount + avatarCount; |
7831 | } | 7825 | } |
7832 | 7826 | ||