mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
why not also osGetLinkStandTarget
This commit is contained in:
@@ -5738,5 +5738,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
return m_host.StandOffset;
|
||||
}
|
||||
|
||||
public LSL_Vector osGetLinkStandTarget(LSL_Integer linkNumber)
|
||||
{
|
||||
if (linkNumber == ScriptBaseClass.LINK_THIS)
|
||||
return m_host.StandOffset;
|
||||
if (linkNumber < 0)
|
||||
return Vector3.Zero;
|
||||
if (linkNumber < 2)
|
||||
return m_host.ParentGroup.RootPart.StandOffset;
|
||||
SceneObjectPart target = m_host.ParentGroup.GetLinkNumPart(linkNumber);
|
||||
if (target == null)
|
||||
return Vector3.Zero;
|
||||
return target.StandOffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -566,5 +566,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber);
|
||||
void osSetStandTarget(vector v);
|
||||
vector osGetStandTarget();
|
||||
vector osGetLinkStandTarget(LSL_Integer linkNumber);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1448,9 +1448,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
}
|
||||
|
||||
public vector osGetStandTarget()
|
||||
|
||||
{
|
||||
return m_OSSL_Functions.osGetStandTarget();
|
||||
}
|
||||
|
||||
public vector osGetLinkStandTarget(LSL_Integer linkNumber)
|
||||
{
|
||||
return m_OSSL_Functions.osGetLinkStandTarget(linkNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user