diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-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 9615d08..b4134a4 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) |
@@ -7807,13 +7806,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7807 | public LSL_Integer llGetNumberOfPrims() | 7806 | public LSL_Integer llGetNumberOfPrims() |
7808 | { | 7807 | { |
7809 | m_host.AddScriptLPS(1); | 7808 | m_host.AddScriptLPS(1); |
7810 | int avatarCount = 0; | 7809 | int avatarCount = m_host.ParentGroup.GetLinkedAvatars().Count; |
7811 | World.ForEachScenePresence(delegate(ScenePresence presence) | 7810 | |
7812 | { | ||
7813 | if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID)) | ||
7814 | avatarCount++; | ||
7815 | }); | ||
7816 | |||
7817 | return m_host.ParentGroup.PrimCount + avatarCount; | 7811 | return m_host.ParentGroup.PrimCount + avatarCount; |
7818 | } | 7812 | } |
7819 | 7813 | ||