Fix llGetLinkKey to report avatars properly
parent
cf97809ff1
commit
07c26111af
|
@ -4117,25 +4117,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_String llGetLinkKey(int linknum)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
List<UUID> keytable = new List<UUID>();
|
||||
// parse for sitting avatare-uuids
|
||||
World.ForEachRootScenePresence(delegate(ScenePresence presence)
|
||||
{
|
||||
if (presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
|
||||
keytable.Add(presence.UUID);
|
||||
});
|
||||
|
||||
int totalprims = m_host.ParentGroup.PrimCount + keytable.Count;
|
||||
if (linknum > m_host.ParentGroup.PrimCount && linknum <= totalprims)
|
||||
{
|
||||
return keytable[totalprims - linknum].ToString();
|
||||
}
|
||||
|
||||
if (linknum == 1 && m_host.ParentGroup.PrimCount == 1 && keytable.Count == 1)
|
||||
{
|
||||
return m_host.UUID.ToString();
|
||||
}
|
||||
|
||||
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
|
||||
if (part != null)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue