mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
fix llGetLinkKey to support LINK_* constants
This commit is contained in:
@@ -4704,6 +4704,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public LSL_Key llGetLinkKey(int linknum)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
|
||||
if (part != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user