aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs11
1 files changed, 11 insertions, 0 deletions
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
3985 } 3985 }
3986 else 3986 else
3987 { 3987 {
3988 if (linknum > m_host.ParentGroup.PrimCount || (linknum == 1 && m_host.ParentGroup.PrimCount == 1))
3989 {
3990 linknum -= (m_host.ParentGroup.PrimCount) + 1;
3991 if (linknum > 0) linknum--; //for linksets
3992
3993 List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET);
3994 if (avatars.Count > linknum)
3995 {
3996 return avatars[linknum].UUID.ToString();
3997 }
3998 }
3988 return UUID.Zero.ToString(); 3999 return UUID.Zero.ToString();
3989 } 4000 }
3990 } 4001 }