mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
fix llGetLinkKey
This commit is contained in:
@@ -4701,13 +4701,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.AddScriptLPS(1);
|
||||
if(linknum < 0)
|
||||
{
|
||||
if (linknum == ScriptBaseClass.LINK_ROOT)
|
||||
return m_host.ParentGroup.RootPart.UUID.ToString();
|
||||
if (linknum == ScriptBaseClass.LINK_THIS)
|
||||
return m_host.UUID.ToString();
|
||||
return ScriptBaseClass.NULL_KEY;
|
||||
}
|
||||
|
||||
if (linknum < 2)
|
||||
return m_host.ParentGroup.RootPart.UUID.ToString();
|
||||
|
||||
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
|
||||
if (part != null)
|
||||
{
|
||||
@@ -4715,9 +4716,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
else
|
||||
{
|
||||
if (linknum > m_host.ParentGroup.PrimCount || (linknum == 1 && m_host.ParentGroup.PrimCount == 1))
|
||||
if (linknum > m_host.ParentGroup.PrimCount)
|
||||
{
|
||||
linknum -= (m_host.ParentGroup.PrimCount) + 1;
|
||||
linknum -= m_host.ParentGroup.PrimCount + 1;
|
||||
|
||||
List<ScenePresence> avatars = GetLinkAvatars(ScriptBaseClass.LINK_SET);
|
||||
if (avatars.Count > linknum)
|
||||
|
||||
Reference in New Issue
Block a user