add osSetLinkSitActiveRange

master
UbitUmarov 2020-01-25 13:32:52 +00:00
parent 598ba5d6ae
commit 64c7e1de5b
4 changed files with 121 additions and 59 deletions

View File

@ -5679,7 +5679,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (v > 128f)
v = 128f;
float old = m_host.SitActiveRange;
m_host.SitActiveRange = (float)v;
if(old != (float)v)
m_host.ParentGroup.HasGroupChanged = true;
}
public void osSetLinkSitActiveRange(LSL_Integer linkNumber, LSL_Float v)
{
if (v > 128f)
v = 128f;
bool changed = false;
InitLSL();
List<SceneObjectPart> parts = m_LSL_Api.GetLinkParts(linkNumber);
for(int i = 0; i < parts.Count; ++i)
{
SceneObjectPart sop = parts[i];
float old = sop.SitActiveRange;
sop.SitActiveRange = (float)v;
if (old != (float)v)
changed = true;
}
if (changed)
m_host.ParentGroup.HasGroupChanged = true;
}
public LSL_Float osGetSitActiveRange()
@ -5690,7 +5714,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void osSetStandTarget(LSL_Vector v)
{
// todo add limits ?
Vector3 old = m_host.StandOffset;
m_host.StandOffset = v;
if(!old.ApproxEquals(v))
m_host.ParentGroup.HasGroupChanged = true;
}
public LSL_Vector osGetStandTarget()

View File

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

View File

@ -1427,6 +1427,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osSetSitActiveRange(v);
}
public void osSetLinkSitActiveRange(LSL_Integer linkNumber, LSL_Float v)
{
m_OSSL_Functions.osSetLinkSitActiveRange(linkNumber, v);
}
public LSL_Float osGetSitActiveRange()
{
return m_OSSL_Functions.osGetSitActiveRange();

View File

@ -1,4 +1,4 @@
84b526ce-3ad0-46bb-7a8a-b37be2734c5b
dbf688af-3bd2-5eb3-a7fb-9c3698f16294
<llsd><map><key>llsd-lsl-syntax-version</key><integer>2</integer>
<key>controls</key>
<map>
@ -1577,7 +1577,7 @@
</map>
<key>OS_APIVERSION</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>10</string>
<key>value</key><string>11</string>
</map>
<key>OS_ATTACH_MSG_ALL</key><map>
<key>type</key><string>integer</string>
@ -1887,23 +1887,23 @@
</map>
<key>PERM_ALL</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>2147483647</string>
<key>value</key><string>0x7fffffff</string>
</map>
<key>PERM_COPY</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>32768</string>
<key>value</key><string>0x8000</string>
</map>
<key>PERM_MODIFY</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>16384</string>
<key>value</key><string>0x4000</string>
</map>
<key>PERM_MOVE</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>524288</string>
<key>value</key><string>0x80000</string>
</map>
<key>PERM_TRANSFER</key><map>
<key>type</key><string>integer</string>
<key>value</key><string>8192</string>
<key>value</key><string>0x2000</string>
</map>
<key>PERMISSION_ATTACH</key><map>
<key>type</key><string>integer</string>
@ -6216,24 +6216,8 @@
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>a</key><map><key>type</key><string>float</string></map></map>
<map><key>b</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osApproxEquals</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osApproxEquals</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
@ -6246,6 +6230,23 @@
</array>
</map>
<key>osApproxEquals</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osApproxEquals</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>va</key><map><key>type</key><string>vector</string></map></map>
<map><key>vb</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osApproxEquals</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
@ -6258,9 +6259,8 @@
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>ra</key><map><key>type</key><string>rotation</string></map></map>
<map><key>rb</key><map><key>type</key><string>rotation</string></map></map>
<map><key>margin</key><map><key>type</key><string>float</string></map></map>
<map><key>a</key><map><key>type</key><string>float</string></map></map>
<map><key>b</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osAvatarName2Key</key>
@ -6816,6 +6816,16 @@
<key>return</key><string>string</string>
<key>arguments</key><undef/>
</map>
<key>osGetSitActiveRange</key>
<map>
<key>return</key><string>float</string>
<key>arguments</key><undef/>
</map>
<key>osGetStandTarget</key>
<map>
<key>return</key><string>vector</string>
<key>arguments</key><undef/>
</map>
<key>osGetSunParam</key>
<map>
<key>return</key><string>float</string>
@ -7238,13 +7248,13 @@
<key>osRegionNotice</key>
<map>
<key>arguments</key><array>
<map><key>agentID</key><map><key>type</key><string>key</string></map></map>
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
</array>
</map>
<key>osRegionNotice</key>
<map>
<key>arguments</key><array>
<map><key>agentID</key><map><key>type</key><string>key</string></map></map>
<map><key>msg</key><map><key>type</key><string>string</string></map></map>
</array>
</map>
@ -7416,6 +7426,13 @@
<map><key>centerOfMass</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osSetLinkSitActiveRange</key>
<map>
<key>arguments</key><array>
<map><key>linkNumber</key><map><key>type</key><string>integer</string></map></map>
<map><key>v</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetOwnerSpeed</key>
<map>
<key>arguments</key><array>
@ -7488,6 +7505,16 @@
</array>
</map>
<key>osSetProjectionParams</key>
<map>
<key>arguments</key><array>
<map><key>projection</key><map><key>type</key><string>integer</string></map></map>
<map><key>texture</key><map><key>type</key><string>key</string></map></map>
<map><key>fov</key><map><key>type</key><string>float</string></map></map>
<map><key>focus</key><map><key>type</key><string>float</string></map></map>
<map><key>amb</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetProjectionParams</key>
<map>
<key>arguments</key><array>
<map><key>prim</key><map><key>type</key><string>key</string></map></map>
@ -7509,16 +7536,6 @@
<map><key>amb</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetProjectionParams</key>
<map>
<key>arguments</key><array>
<map><key>projection</key><map><key>type</key><string>integer</string></map></map>
<map><key>texture</key><map><key>type</key><string>key</string></map></map>
<map><key>fov</key><map><key>type</key><string>float</string></map></map>
<map><key>focus</key><map><key>type</key><string>float</string></map></map>
<map><key>amb</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetRegionSunSettings</key>
<map>
<key>arguments</key><array>
@ -7533,6 +7550,12 @@
<map><key>height</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetSitActiveRange</key>
<map>
<key>arguments</key><array>
<map><key>v</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetSoundRadius</key>
<map>
<key>arguments</key><array>
@ -7547,6 +7570,12 @@
<map><key>SpeedModifier</key><map><key>type</key><string>float</string></map></map>
</array>
</map>
<key>osSetStandTarget</key>
<map>
<key>arguments</key><array>
<map><key>v</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osSetStateEvents</key>
<map>
<key>arguments</key><array>
@ -7622,21 +7651,10 @@
<key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>value</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osStringIndexOf</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>value</key><map><key>type</key><string>string</string></map></map>
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osStringLastIndexOf</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
@ -7656,6 +7674,17 @@
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osStringLastIndexOf</key>
<map>
<key>return</key><string>integer</string>
<key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>value</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>count</key><map><key>type</key><string>integer</string></map></map>
<map><key>ignorecase</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osStringRemove</key>
<map>
<key>return</key><string>string</string>
@ -7689,7 +7718,6 @@
<key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>length</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osStringSubString</key>
@ -7698,6 +7726,7 @@
<key>arguments</key><array>
<map><key>src</key><map><key>type</key><string>string</string></map></map>
<map><key>start</key><map><key>type</key><string>integer</string></map></map>
<map><key>length</key><map><key>type</key><string>integer</string></map></map>
</array>
</map>
<key>osSunGetParam</key>
@ -7715,6 +7744,14 @@
</array>
</map>
<key>osTeleportAgent</key>
<map>
<key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osTeleportAgent</key>
<map>
<key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
@ -7733,14 +7770,6 @@
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osTeleportAgent</key>
<map>
<key>arguments</key><array>
<map><key>agent</key><map><key>type</key><string>string</string></map></map>
<map><key>position</key><map><key>type</key><string>vector</string></map></map>
<map><key>lookat</key><map><key>type</key><string>vector</string></map></map>
</array>
</map>
<key>osTeleportObject</key>
<map>
<key>return</key><string>integer</string>