llAvatarOnLinkSitTarget Implementation

http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
remove-scene-viewer
Pixel Tomsen 2011-09-26 20:18:06 +02:00 committed by Justin Clark-Casey (justincc)
parent a3531dec1a
commit 528fcede6c
3 changed files with 20 additions and 0 deletions

View File

@ -6296,6 +6296,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<SceneObjectPart> 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);

View File

@ -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);

View File

@ -129,6 +129,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);