aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index deeccde..7493368 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -2371,6 +2371,7 @@ namespace OpenSim.Region.Framework.Scenes
2371 Quaternion oldRootRotation = linkPart.RotationOffset; 2371 Quaternion oldRootRotation = linkPart.RotationOffset;
2372 2372
2373 linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; 2373 linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition;
2374 linkPart.ParentID = m_rootPart.LocalId;
2374 linkPart.GroupPosition = AbsolutePosition; 2375 linkPart.GroupPosition = AbsolutePosition;
2375 Vector3 axPos = linkPart.OffsetPosition; 2376 Vector3 axPos = linkPart.OffsetPosition;
2376 2377
@@ -3382,14 +3383,17 @@ namespace OpenSim.Region.Framework.Scenes
3382 if (prim.UUID != m_rootPart.UUID) 3383 if (prim.UUID != m_rootPart.UUID)
3383 { 3384 {
3384 prim.IgnoreUndoUpdate = true; 3385 prim.IgnoreUndoUpdate = true;
3386
3387 Quaternion NewRot = oldParentRot * prim.RotationOffset;
3388 NewRot = Quaternion.Inverse(axRot) * NewRot;
3389 prim.RotationOffset = NewRot;
3390
3385 Vector3 axPos = prim.OffsetPosition; 3391 Vector3 axPos = prim.OffsetPosition;
3386 3392
3387 axPos *= oldParentRot; 3393 axPos *= oldParentRot;
3388 axPos *= Quaternion.Inverse(axRot); 3394 axPos *= Quaternion.Inverse(axRot);
3389 prim.OffsetPosition = axPos; 3395 prim.OffsetPosition = axPos;
3390 3396
3391 prim.RotationOffset *= Quaternion.Inverse(prim.GetWorldRotation()) * (oldParentRot * prim.RotationOffset);
3392
3393 prim.IgnoreUndoUpdate = false; 3397 prim.IgnoreUndoUpdate = false;
3394 prim.IgnoreUndoUpdate = false; 3398 prim.IgnoreUndoUpdate = false;
3395 } 3399 }