Add support for attached avatars in llGetLinkKey()

avinationmerge
meta7 2010-08-21 07:22:41 -07:00
parent 839b08c32b
commit 3ffdadef70
1 changed files with 11 additions and 0 deletions

View File

@ -3985,6 +3985,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
else 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<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET);
if (avatars.Count > linknum)
{
return avatars[linknum].UUID.ToString();
}
}
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }
} }