mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
... osSetLinkStandTarget
This commit is contained in:
@@ -5734,6 +5734,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
m_host.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
|
||||
public void osSetLinkStandTarget(LSL_Integer linkNumber, LSL_Vector v)
|
||||
{
|
||||
// todo add limits ?
|
||||
SceneObjectPart target = null;
|
||||
if (linkNumber == ScriptBaseClass.LINK_THIS)
|
||||
target = m_host;
|
||||
else if (linkNumber < 0)
|
||||
return;
|
||||
else if (linkNumber < 2)
|
||||
target = m_host.ParentGroup.RootPart;
|
||||
else
|
||||
target = m_host.ParentGroup.GetLinkNumPart(linkNumber);
|
||||
|
||||
if (target == null)
|
||||
return;
|
||||
|
||||
Vector3 old = target.StandOffset;
|
||||
target.StandOffset = v;
|
||||
if (!old.ApproxEquals(v))
|
||||
m_host.ParentGroup.HasGroupChanged = true;
|
||||
}
|
||||
|
||||
public LSL_Vector osGetStandTarget()
|
||||
{
|
||||
return m_host.StandOffset;
|
||||
|
||||
@@ -565,6 +565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
LSL_Float osGetSitActiveRange();
|
||||
LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber);
|
||||
void osSetStandTarget(vector v);
|
||||
void osSetLinkStandTarget(LSL_Integer linkNumber, vector v);
|
||||
vector osGetStandTarget();
|
||||
vector osGetLinkStandTarget(LSL_Integer linkNumber);
|
||||
}
|
||||
|
||||
@@ -1447,6 +1447,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_OSSL_Functions.osSetStandTarget(v);
|
||||
}
|
||||
|
||||
public void osSetLinkStandTarget(LSL_Integer linkNumber, vector v)
|
||||
{
|
||||
m_OSSL_Functions.osSetLinkStandTarget(linkNumber, v);
|
||||
}
|
||||
|
||||
public vector osGetStandTarget()
|
||||
{
|
||||
return m_OSSL_Functions.osGetStandTarget();
|
||||
|
||||
Reference in New Issue
Block a user