diff options
author | Melanie | 2012-09-03 14:05:18 +0100 |
---|---|---|
committer | Melanie | 2012-09-03 14:05:18 +0100 |
commit | 96b50d28f40e9abcf247f6fbf72369a51d15722e (patch) | |
tree | 00ac7f0e6bde5b80c27322ed3977c0efd0f206ed /OpenSim/Region | |
parent | Merge branch 'master' into careminster (diff) | |
parent | formatting (diff) | |
download | opensim-SC-96b50d28f40e9abcf247f6fbf72369a51d15722e.zip opensim-SC-96b50d28f40e9abcf247f6fbf72369a51d15722e.tar.gz opensim-SC-96b50d28f40e9abcf247f6fbf72369a51d15722e.tar.bz2 opensim-SC-96b50d28f40e9abcf247f6fbf72369a51d15722e.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 47 |
1 files changed, 3 insertions, 44 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bf29288..dda8257 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2314,31 +2314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2314 | public void llSetRot(LSL_Rotation rot) | 2314 | public void llSetRot(LSL_Rotation rot) |
2315 | { | 2315 | { |
2316 | m_host.AddScriptLPS(1); | 2316 | m_host.AddScriptLPS(1); |
2317 | 2317 | SetRot(m_host, rot); | |
2318 | // try to let this work as in SL... | ||
2319 | if (m_host.LinkNum < 2) | ||
2320 | { | ||
2321 | // Special case: If we are root, rotate complete SOG to new | ||
2322 | // rotation. | ||
2323 | // We are root if the link number is 0 (single prim) or 1 | ||
2324 | // (root prim). ParentID may be nonzero in attachments and | ||
2325 | // using it would cause attachments and HUDs to rotate | ||
2326 | // to the wrong positions. | ||
2327 | |||
2328 | SetRot(m_host, rot); | ||
2329 | } | ||
2330 | else | ||
2331 | { | ||
2332 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. | ||
2333 | SceneObjectPart rootPart; | ||
2334 | if (m_host.ParentGroup != null) // better safe than sorry | ||
2335 | { | ||
2336 | rootPart = m_host.ParentGroup.RootPart; | ||
2337 | if (rootPart != null) | ||
2338 | SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot); | ||
2339 | } | ||
2340 | } | ||
2341 | |||
2342 | ScriptSleep(200); | 2318 | ScriptSleep(200); |
2343 | } | 2319 | } |
2344 | 2320 | ||
@@ -7870,23 +7846,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7870 | 7846 | ||
7871 | break; | 7847 | break; |
7872 | case (int)ScriptBaseClass.PRIM_ROTATION: | 7848 | case (int)ScriptBaseClass.PRIM_ROTATION: |
7849 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
7873 | if (remain < 1) | 7850 | if (remain < 1) |
7874 | return null; | 7851 | return null; |
7875 | 7852 | ||
7876 | LSL_Rotation q = rules.GetQuaternionItem(idx++); | 7853 | SetRot(part, rules.GetQuaternionItem(idx++)); |
7877 | SceneObjectPart rootPart = parentgrp.RootPart; | ||
7878 | // try to let this work as in SL... | ||
7879 | if (rootPart == part) | ||
7880 | { | ||
7881 | // special case: If we are root, rotate complete SOG to new rotation | ||
7882 | SetRot(part, q); | ||
7883 | } | ||
7884 | else | ||
7885 | { | ||
7886 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. | ||
7887 | // sounds like sl bug that we need to replicate | ||
7888 | SetRot(part, rootPart.RotationOffset * (Quaternion)q); | ||
7889 | } | ||
7890 | 7854 | ||
7891 | break; | 7855 | break; |
7892 | 7856 | ||
@@ -8223,11 +8187,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8223 | string primDesc = rules.GetLSLStringItem(idx++); | 8187 | string primDesc = rules.GetLSLStringItem(idx++); |
8224 | part.Description = primDesc; | 8188 | part.Description = primDesc; |
8225 | break; | 8189 | break; |
8226 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
8227 | if (remain < 1) | ||
8228 | return null; | ||
8229 | SetRot(part, rules.GetQuaternionItem(idx++)); | ||
8230 | break; | ||
8231 | case (int)ScriptBaseClass.PRIM_OMEGA: | 8190 | case (int)ScriptBaseClass.PRIM_OMEGA: |
8232 | if (remain < 3) | 8191 | if (remain < 3) |
8233 | return null; | 8192 | return null; |