From 3ffdadef7014334666d0d42ff8bd9bd83b3c6505 Mon Sep 17 00:00:00 2001 From: meta7 Date: Sat, 21 Aug 2010 07:22:41 -0700 Subject: Add support for attached avatars in llGetLinkKey() --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 37f2433..9615d08 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3985,6 +3985,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { + if (linknum > m_host.ParentGroup.PrimCount || (linknum == 1 && m_host.ParentGroup.PrimCount == 1)) + { + linknum -= (m_host.ParentGroup.PrimCount) + 1; + if (linknum > 0) linknum--; //for linksets + + List avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET); + if (avatars.Count > linknum) + { + return avatars[linknum].UUID.ToString(); + } + } return UUID.Zero.ToString(); } } -- cgit v1.1