aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs20
1 files changed, 19 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 0734e1c..fcd94a4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -6433,7 +6433,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6433 return; 6433 return;
6434 6434
6435 LSL_Rotation q = rules.GetQuaternionItem(idx++); 6435 LSL_Rotation q = rules.GetQuaternionItem(idx++);
6436 llSetRot(q); 6436 // try to let this work as in SL...
6437 if (part.ParentID == 0)
6438 {
6439 // special case: If we are root, rotate complete SOG to new rotation
6440 SetRot(part, Rot2Quaternion(q));
6441 }
6442 else
6443 {
6444 // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
6445 SceneObjectGroup group = part.ParentGroup;
6446 if (group != null) // a bit paranoid, maybe
6447 {
6448 SceneObjectPart rootPart = group.RootPart;
6449 if (rootPart != null) // again, better safe than sorry
6450 {
6451 SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q));
6452 }
6453 }
6454 }
6437 6455
6438 break; 6456 break;
6439 6457