diff options
author | Melanie | 2010-12-26 20:42:47 +0100 |
---|---|---|
committer | Melanie | 2010-12-26 20:42:47 +0100 |
commit | f2dd324bc8fd7ef4be7426a660d7548e53c54962 (patch) | |
tree | 2938911d1344f74e46094fb1706abdd35d9bb466 | |
parent | Remove some code that was meant to fool the viewer into thinking SLT. It never (diff) | |
download | opensim-SC-f2dd324bc8fd7ef4be7426a660d7548e53c54962.zip opensim-SC-f2dd324bc8fd7ef4be7426a660d7548e53c54962.tar.gz opensim-SC-f2dd324bc8fd7ef4be7426a660d7548e53c54962.tar.bz2 opensim-SC-f2dd324bc8fd7ef4be7426a660d7548e53c54962.tar.xz |
Fix linking link sets to rotated prims.
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 72443b9..304de67 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2584,7 +2584,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2584 | 2584 | ||
2585 | axPos *= parentRot; | 2585 | axPos *= parentRot; |
2586 | part.OffsetPosition = axPos; | 2586 | part.OffsetPosition = axPos; |
2587 | part.GroupPosition = oldGroupPosition + part.OffsetPosition; | 2587 | Vector3 newPos = oldGroupPosition + part.OffsetPosition; |
2588 | part.GroupPosition = newPos; | ||
2588 | part.OffsetPosition = Vector3.Zero; | 2589 | part.OffsetPosition = Vector3.Zero; |
2589 | part.RotationOffset = worldRot; | 2590 | part.RotationOffset = worldRot; |
2590 | 2591 | ||
@@ -2595,7 +2596,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2595 | 2596 | ||
2596 | part.LinkNum = linkNum; | 2597 | part.LinkNum = linkNum; |
2597 | 2598 | ||
2598 | part.OffsetPosition = part.GroupPosition - AbsolutePosition; | 2599 | part.OffsetPosition = newPos - AbsolutePosition; |
2599 | 2600 | ||
2600 | Quaternion rootRotation = m_rootPart.RotationOffset; | 2601 | Quaternion rootRotation = m_rootPart.RotationOffset; |
2601 | 2602 | ||
@@ -2605,7 +2606,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2605 | 2606 | ||
2606 | parentRot = m_rootPart.RotationOffset; | 2607 | parentRot = m_rootPart.RotationOffset; |
2607 | oldRot = part.RotationOffset; | 2608 | oldRot = part.RotationOffset; |
2608 | Quaternion newRot = Quaternion.Inverse(parentRot) * oldRot; | 2609 | Quaternion newRot = Quaternion.Inverse(parentRot) * worldRot; |
2609 | part.RotationOffset = newRot; | 2610 | part.RotationOffset = newRot; |
2610 | } | 2611 | } |
2611 | 2612 | ||