diff options
author | Melanie | 2012-09-03 21:52:12 +0100 |
---|---|---|
committer | Melanie | 2012-09-03 21:52:12 +0100 |
commit | d297eb39e57f9dc70abe43839e263af19b5777e2 (patch) | |
tree | 849ed1014919846970b9a937bea05144a6f9ea53 /OpenSim | |
parent | Revert "no need to assign rotation to a variable now" (diff) | |
download | opensim-SC-d297eb39e57f9dc70abe43839e263af19b5777e2.zip opensim-SC-d297eb39e57f9dc70abe43839e263af19b5777e2.tar.gz opensim-SC-d297eb39e57f9dc70abe43839e263af19b5777e2.tar.bz2 opensim-SC-d297eb39e57f9dc70abe43839e263af19b5777e2.tar.xz |
Revert "made setting rotation match Second Life"
Second Life seems to have introduced a bug, as we have confirmation that SL
behavior changed recently and changed in contradiction to their stated intention
This appears to be another of the bugs SL is notorious for. Signpost and I have
decided to back this out until SL's intention becomes clear.
This reverts commit f7b88d1c40ba06c62491d8d32809fe6c1c4d360d.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 9f952d1..be22cb4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2083,7 +2083,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2083 | public void llSetRot(LSL_Rotation rot) | 2083 | public void llSetRot(LSL_Rotation rot) |
2084 | { | 2084 | { |
2085 | m_host.AddScriptLPS(1); | 2085 | m_host.AddScriptLPS(1); |
2086 | |||
2087 | // try to let this work as in SL... | ||
2088 | if (m_host.ParentID == 0) | ||
2089 | { | ||
2090 | // special case: If we are root, rotate complete SOG to new rotation | ||
2086 | SetRot(m_host, rot); | 2091 | SetRot(m_host, rot); |
2092 | } | ||
2093 | else | ||
2094 | { | ||
2095 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. | ||
2096 | SceneObjectPart rootPart = m_host.ParentGroup.RootPart; | ||
2097 | if (rootPart != null) // better safe than sorry | ||
2098 | { | ||
2099 | SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot); | ||
2100 | } | ||
2101 | } | ||
2102 | |||
2087 | ScriptSleep(200); | 2103 | ScriptSleep(200); |
2088 | } | 2104 | } |
2089 | 2105 | ||
@@ -7276,12 +7292,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7276 | 7292 | ||
7277 | break; | 7293 | break; |
7278 | case (int)ScriptBaseClass.PRIM_ROTATION: | 7294 | case (int)ScriptBaseClass.PRIM_ROTATION: |
7279 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
7280 | if (remain < 1) | 7295 | if (remain < 1) |
7281 | return null; | 7296 | return null; |
7282 | 7297 | ||
7283 | LSL_Rotation q = rules.GetQuaternionItem(idx++); | 7298 | LSL_Rotation q = rules.GetQuaternionItem(idx++); |
7299 | // try to let this work as in SL... | ||
7300 | if (part.ParentID == 0) | ||
7301 | { | ||
7302 | // special case: If we are root, rotate complete SOG to new rotation | ||
7284 | SetRot(part, q); | 7303 | SetRot(part, q); |
7304 | } | ||
7305 | else | ||
7306 | { | ||
7307 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. | ||
7308 | SceneObjectPart rootPart = part.ParentGroup.RootPart; | ||
7309 | SetRot(part, rootPart.RotationOffset * (Quaternion)q); | ||
7310 | } | ||
7285 | 7311 | ||
7286 | break; | 7312 | break; |
7287 | 7313 | ||
@@ -7588,6 +7614,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7588 | string primDesc = rules.GetLSLStringItem(idx++); | 7614 | string primDesc = rules.GetLSLStringItem(idx++); |
7589 | part.Description = primDesc; | 7615 | part.Description = primDesc; |
7590 | break; | 7616 | break; |
7617 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | ||
7618 | if (remain < 1) | ||
7619 | return null; | ||
7620 | SetRot(part, rules.GetQuaternionItem(idx++)); | ||
7621 | break; | ||
7591 | case (int)ScriptBaseClass.PRIM_OMEGA: | 7622 | case (int)ScriptBaseClass.PRIM_OMEGA: |
7592 | if (remain < 3) | 7623 | if (remain < 3) |
7593 | return null; | 7624 | return null; |