aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authormeta72010-08-22 09:32:40 -0700
committermeta72010-08-22 09:32:40 -0700
commit46412f49313472f1665f864e3b631fcdeeff70da (patch)
treec10466ea1cc727bdbcceddf17bd1be15ba81e8f8
parentAdd support for attached avatars in llGetLinkKey() (diff)
downloadopensim-SC_OLD-46412f49313472f1665f864e3b631fcdeeff70da.zip
opensim-SC_OLD-46412f49313472f1665f864e3b631fcdeeff70da.tar.gz
opensim-SC_OLD-46412f49313472f1665f864e3b631fcdeeff70da.tar.bz2
opensim-SC_OLD-46412f49313472f1665f864e3b631fcdeeff70da.tar.xz
Fix llGetLinkKey and llGetNumberOfPrims to play nice with avatars in the linkset (emulated)
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs10
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