diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4f21c6733c..1b82ad1904 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6756,6 +6756,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return m_host.GetAvatarOnSitTarget().ToString(); } + // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget + public LSL_String llAvatarOnLinkSitTarget(int linknum) + { + m_host.AddScriptLPS(1); + if(linknum == ScriptBaseClass.LINK_SET || + linknum == ScriptBaseClass.LINK_ALL_CHILDREN || + linknum == ScriptBaseClass.LINK_ALL_OTHERS) return UUID.Zero.ToString(); + + List parts = GetLinkParts(linknum); + if (parts.Count == 0) return UUID.Zero.ToString(); + return parts[0].SitTargetAvatar.ToString(); + } + + public void llAddToLandPassList(string avatar, double hours) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 7c388fe786..4ad4123a24 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -54,6 +54,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_Float llAtan2(double x, double y); void llAttachToAvatar(int attachment); LSL_Key llAvatarOnSitTarget(); + LSL_Key llAvatarOnLinkSitTarget(int linknum); LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up); LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle); LSL_Integer llBase64ToInteger(string str); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index ca54862487..a88a1f43ac 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -130,6 +130,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llAvatarOnSitTarget(); } + public LSL_Key llAvatarOnLinkSitTarget(int linknum) + { + return m_LSL_Functions.llAvatarOnLinkSitTarget(linknum); + } + public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) { return m_LSL_Functions.llAxes2Rot(fwd, left, up);