diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6c47645..58f2586 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2397,6 +2397,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2397 | Quaternion oldRootRotation = linkPart.RotationOffset; | 2397 | Quaternion oldRootRotation = linkPart.RotationOffset; |
2398 | 2398 | ||
2399 | linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; | 2399 | linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; |
2400 | linkPart.ParentID = m_rootPart.LocalId; | ||
2400 | linkPart.GroupPosition = AbsolutePosition; | 2401 | linkPart.GroupPosition = AbsolutePosition; |
2401 | Vector3 axPos = linkPart.OffsetPosition; | 2402 | Vector3 axPos = linkPart.OffsetPosition; |
2402 | 2403 | ||
@@ -3431,14 +3432,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3431 | if (prim.UUID != m_rootPart.UUID) | 3432 | if (prim.UUID != m_rootPart.UUID) |
3432 | { | 3433 | { |
3433 | prim.IgnoreUndoUpdate = true; | 3434 | prim.IgnoreUndoUpdate = true; |
3435 | |||
3436 | Quaternion NewRot = oldParentRot * prim.RotationOffset; | ||
3437 | NewRot = Quaternion.Inverse(axRot) * NewRot; | ||
3438 | prim.RotationOffset = NewRot; | ||
3439 | |||
3434 | Vector3 axPos = prim.OffsetPosition; | 3440 | Vector3 axPos = prim.OffsetPosition; |
3435 | 3441 | ||
3436 | axPos *= oldParentRot; | 3442 | axPos *= oldParentRot; |
3437 | axPos *= Quaternion.Inverse(axRot); | 3443 | axPos *= Quaternion.Inverse(axRot); |
3438 | prim.OffsetPosition = axPos; | 3444 | prim.OffsetPosition = axPos; |
3439 | 3445 | ||
3440 | prim.RotationOffset *= Quaternion.Inverse(prim.GetWorldRotation()) * (oldParentRot * prim.RotationOffset); | ||
3441 | |||
3442 | prim.IgnoreUndoUpdate = false; | 3446 | prim.IgnoreUndoUpdate = false; |
3443 | } | 3447 | } |
3444 | } | 3448 | } |