diff options
author | Melanie | 2012-02-24 09:56:06 +0000 |
---|---|---|
committer | Melanie | 2012-02-24 09:56:06 +0000 |
commit | 37068d17c5a6a4679f75af12cbbcfc3c78790e33 (patch) | |
tree | 42454c2fd6072b0baebb4f3d7632476de3ad18e9 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |
parent | Partially apply the core banlines fix (diff) | |
parent | Take watchdog alarm calling back outside the m_threads lock. (diff) | |
download | opensim-SC-37068d17c5a6a4679f75af12cbbcfc3c78790e33.zip opensim-SC-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.gz opensim-SC-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.bz2 opensim-SC-37068d17c5a6a4679f75af12cbbcfc3c78790e33.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 32 |
1 files changed, 27 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 d0430f4..ba02a78 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6834,16 +6834,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6834 | } | 6834 | } |
6835 | } | 6835 | } |
6836 | 6836 | ||
6837 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | 6837 | protected void SitTarget(SceneObjectPart part, LSL_Vector offset, LSL_Rotation rot) |
6838 | { | 6838 | { |
6839 | m_host.AddScriptLPS(1); | ||
6840 | // LSL quaternions can normalize to 0, normal Quaternions can't. | 6839 | // LSL quaternions can normalize to 0, normal Quaternions can't. |
6841 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) | 6840 | if (rot.s == 0 && rot.x == 0 && rot.y == 0 && rot.z == 0) |
6842 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 | 6841 | rot.z = 1; // ZERO_ROTATION = 0,0,0,1 |
6843 | 6842 | ||
6844 | m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); | 6843 | part.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); |
6845 | m_host.SitTargetOrientation = Rot2Quaternion(rot); | 6844 | part.SitTargetOrientation = Rot2Quaternion(rot); |
6846 | m_host.ParentGroup.HasGroupChanged = true; | 6845 | part.ParentGroup.HasGroupChanged = true; |
6846 | } | ||
6847 | |||
6848 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | ||
6849 | { | ||
6850 | m_host.AddScriptLPS(1); | ||
6851 | SitTarget(m_host, offset, rot); | ||
6852 | } | ||
6853 | |||
6854 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | ||
6855 | { | ||
6856 | m_host.AddScriptLPS(1); | ||
6857 | if (link == ScriptBaseClass.LINK_ROOT) | ||
6858 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); | ||
6859 | else if (link == ScriptBaseClass.LINK_THIS) | ||
6860 | SitTarget(m_host, offset, rot); | ||
6861 | else | ||
6862 | { | ||
6863 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(link); | ||
6864 | if (null != part) | ||
6865 | { | ||
6866 | SitTarget(part, offset, rot); | ||
6867 | } | ||
6868 | } | ||
6847 | } | 6869 | } |
6848 | 6870 | ||
6849 | public LSL_String llAvatarOnSitTarget() | 6871 | public LSL_String llAvatarOnSitTarget() |