aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorPixelTomsen2012-02-22 20:15:42 +0100
committerJustin Clark-Casey (justincc)2012-02-24 00:58:11 +0000
commit0b9f4d7e749a14c556d7f8a4ea64c54625cf58dc (patch)
treec588aa562b85f0cf612dde595339ed356e98eb4e /OpenSim/Region
parentLoad appropriate 32-bit/64-bit Windows sqlite dll if using WebStatsModule. (diff)
downloadopensim-SC-0b9f4d7e749a14c556d7f8a4ea64c54625cf58dc.zip
opensim-SC-0b9f4d7e749a14c556d7f8a4ea64c54625cf58dc.tar.gz
opensim-SC-0b9f4d7e749a14c556d7f8a4ea64c54625cf58dc.tar.bz2
opensim-SC-0b9f4d7e749a14c556d7f8a4ea64c54625cf58dc.tar.xz
llLinkSitTarget implementation http://wiki.secondlife.com/wiki/LlLinkSitTarget
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs32
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs5
3 files changed, 33 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 61a6907..2eba2b1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6376,16 +6376,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6376 } 6376 }
6377 } 6377 }
6378 6378
6379 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) 6379 protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot)
6380 { 6380 {
6381 m_host.AddScriptLPS(1);
6382 // LSL quaternions can normalize to 0, normal Quaternions can't. 6381 // LSL quaternions can normalize to 0, normal Quaternions can't.
6383 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) 6382 if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0)
6384 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 6383 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
6385 6384
6386 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 6385 part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
6387 m_host.SitTargetOrientation = Rot2Quaternion(rot); 6386 part.SitTargetOrientation = Rot2Quaternion(rot);
6388 m_host.ParentGroup.HasGroupChanged = true; 6387 part.ParentGroup.HasGroupChanged = true;
6388 }
6389
6390 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
6391 {
6392 m_host.AddScriptLPS(1);
6393 SitTarget(m_host, offset, rot);
6394 }
6395
6396 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
6397 {
6398 m_host.AddScriptLPS(1);
6399 if (link == ScriptBaseClass.LINK_ROOT)
6400 SitTarget(m_host.ParentGroup.RootPart, offset, rot);
6401 else if (link == ScriptBaseClass.LINK_THIS)
6402 SitTarget(m_host, offset, rot);
6403 else
6404 {
6405 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link);
6406 if (null != part)
6407 {
6408 SitTarget(part, offset, rot);
6409 }
6410 }
6389 } 6411 }
6390 6412
6391 public LSL_String llAvatarOnSitTarget() 6413 public LSL_String llAvatarOnSitTarget()
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
index 6106a65..7d39ccc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs
@@ -218,6 +218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
218 LSL_String llGetDisplayName(string id); 218 LSL_String llGetDisplayName(string id);
219 LSL_String llRequestDisplayName(string id); 219 LSL_String llRequestDisplayName(string id);
220 void llLinkParticleSystem(int linknum, LSL_List rules); 220 void llLinkParticleSystem(int linknum, LSL_List rules);
221 void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot);
221 LSL_String llList2CSV(LSL_List src); 222 LSL_String llList2CSV(LSL_List src);
222 LSL_Float llList2Float(LSL_List src, int index); 223 LSL_Float llList2Float(LSL_List src, int index);
223 LSL_Integer llList2Integer(LSL_List src, int index); 224 LSL_Integer llList2Integer(LSL_List src, int index);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
index 83550a5..24c3d95 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs
@@ -1688,6 +1688,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
1688 m_LSL_Functions.llSitTarget(offset, rot); 1688 m_LSL_Functions.llSitTarget(offset, rot);
1689 } 1689 }
1690 1690
1691 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
1692 {
1693 m_LSL_Functions.llLinkSitTarget(link, offset, rot);
1694 }
1695
1691 public void llSleep(double sec) 1696 public void llSleep(double sec)
1692 { 1697 {
1693 m_LSL_Functions.llSleep(sec); 1698 m_LSL_Functions.llSleep(sec);