diff options
Diffstat (limited to '')
-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 ea6aab0..3e1439d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2365,6 +2365,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2365 | Quaternion oldRootRotation = linkPart.RotationOffset; | 2365 | Quaternion oldRootRotation = linkPart.RotationOffset; |
2366 | 2366 | ||
2367 | linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; | 2367 | linkPart.OffsetPosition = linkPart.GroupPosition - AbsolutePosition; |
2368 | linkPart.ParentID = m_rootPart.LocalId; | ||
2368 | linkPart.GroupPosition = AbsolutePosition; | 2369 | linkPart.GroupPosition = AbsolutePosition; |
2369 | Vector3 axPos = linkPart.OffsetPosition; | 2370 | Vector3 axPos = linkPart.OffsetPosition; |
2370 | 2371 | ||
@@ -3385,14 +3386,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3385 | if (prim.UUID != m_rootPart.UUID) | 3386 | if (prim.UUID != m_rootPart.UUID) |
3386 | { | 3387 | { |
3387 | prim.IgnoreUndoUpdate = true; | 3388 | prim.IgnoreUndoUpdate = true; |
3389 | |||
3390 | Quaternion NewRot = oldParentRot * prim.RotationOffset; | ||
3391 | NewRot = Quaternion.Inverse(axRot) * NewRot; | ||
3392 | prim.RotationOffset = NewRot; | ||
3393 | |||
3388 | Vector3 axPos = prim.OffsetPosition; | 3394 | Vector3 axPos = prim.OffsetPosition; |
3389 | 3395 | ||
3390 | axPos *= oldParentRot; | 3396 | axPos *= oldParentRot; |
3391 | axPos *= Quaternion.Inverse(axRot); | 3397 | axPos *= Quaternion.Inverse(axRot); |
3392 | prim.OffsetPosition = axPos; | 3398 | prim.OffsetPosition = axPos; |
3393 | 3399 | ||
3394 | prim.RotationOffset *= Quaternion.Inverse(prim.GetWorldRotation()) * (oldParentRot * prim.RotationOffset); | ||
3395 | |||
3396 | prim.IgnoreUndoUpdate = false; | 3400 | prim.IgnoreUndoUpdate = false; |
3397 | prim.IgnoreUndoUpdate = false; | 3401 | prim.IgnoreUndoUpdate = false; |
3398 | } | 3402 | } |