add osGetLinkSitActiveRange

master
UbitUmarov 2020-01-25 14:24:53 +00:00
parent 64c7e1de5b
commit 004cab9289
3 changed files with 20 additions and 0 deletions

View File

@ -5711,6 +5711,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return m_host.SitActiveRange; return m_host.SitActiveRange;
} }
public LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber)
{
if (linkNumber == ScriptBaseClass.LINK_THIS)
return m_host.SitActiveRange;
if (linkNumber < 0)
return int.MinValue;
if (linkNumber < 2)
return m_host.ParentGroup.RootPart.SitActiveRange;
SceneObjectPart target = m_host.ParentGroup.GetLinkNumPart(linkNumber);
if (target == null)
return int.MinValue;
return target.SitActiveRange;
}
public void osSetStandTarget(LSL_Vector v) public void osSetStandTarget(LSL_Vector v)
{ {
// todo add limits ? // todo add limits ?

View File

@ -563,6 +563,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void osSetSitActiveRange(LSL_Float v); void osSetSitActiveRange(LSL_Float v);
void osSetLinkSitActiveRange(LSL_Integer linkNumber, LSL_Float v); void osSetLinkSitActiveRange(LSL_Integer linkNumber, LSL_Float v);
LSL_Float osGetSitActiveRange(); LSL_Float osGetSitActiveRange();
LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber);
void osSetStandTarget(vector v); void osSetStandTarget(vector v);
vector osGetStandTarget(); vector osGetStandTarget();
} }

View File

@ -1437,6 +1437,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_OSSL_Functions.osGetSitActiveRange(); return m_OSSL_Functions.osGetSitActiveRange();
} }
public LSL_Float osGetLinkSitActiveRange(LSL_Integer linkNumber)
{
return m_OSSL_Functions.osGetLinkSitActiveRange(linkNumber);
}
public void osSetStandTarget(vector v) public void osSetStandTarget(vector v)
{ {
m_OSSL_Functions.osSetStandTarget(v); m_OSSL_Functions.osSetStandTarget(v);