diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 42a9b4d..a73d140 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2277,16 +2277,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
2277 | offset = part.SitTargetPosition; | 2277 | offset = part.SitTargetPosition; |
2278 | sitOrientation = part.SitTargetOrientation; | 2278 | sitOrientation = part.SitTargetOrientation; |
2279 | 2279 | ||
2280 | // m_log.DebugFormat("Old sit orient {0}", sitOrientation); | 2280 | if (!part.IsRoot) |
2281 | if (part.IsRoot) | 2281 | { |
2282 | sitOrientation = sitOrientation; | 2282 | // m_log.DebugFormat("Old sit orient {0}", sitOrientation); |
2283 | else | ||
2284 | sitOrientation = part.RotationOffset * sitOrientation; | 2283 | sitOrientation = part.RotationOffset * sitOrientation; |
2285 | // m_log.DebugFormat("New sit orient {0}", sitOrientation); | 2284 | // m_log.DebugFormat("New sit orient {0}", sitOrientation); |
2286 | |||
2287 | // m_log.DebugFormat("Old sit offset {0}", offset); | 2285 | // m_log.DebugFormat("Old sit offset {0}", offset); |
2288 | offset = offset * sitOrientation; | 2286 | offset = offset * part.RotationOffset; |
2289 | // m_log.DebugFormat("New sit offset {0}", offset); | 2287 | // m_log.DebugFormat("New sit offset {0}", offset); |
2288 | } | ||
2290 | 2289 | ||
2291 | canSit = true; | 2290 | canSit = true; |
2292 | } | 2291 | } |
@@ -2604,19 +2603,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
2604 | //Quaternion result = (sitTargetOrient * vq) * nq; | 2603 | //Quaternion result = (sitTargetOrient * vq) * nq; |
2605 | 2604 | ||
2606 | Vector3 newPos = sitTargetPos + SIT_TARGET_ADJUSTMENT; | 2605 | Vector3 newPos = sitTargetPos + SIT_TARGET_ADJUSTMENT; |
2606 | Quaternion newRot; | ||
2607 | 2607 | ||
2608 | if (part.IsRoot) | 2608 | if (part.IsRoot) |
2609 | Rotation = sitTargetOrient; | 2609 | { |
2610 | newRot = sitTargetOrient; | ||
2611 | } | ||
2610 | else | 2612 | else |
2611 | Rotation = part.RotationOffset * sitTargetOrient; | 2613 | { |
2612 | 2614 | newPos = newPos * part.RotationOffset; | |
2613 | // m_log.DebugFormat("Old offset2 {0}", newPos); | 2615 | newRot = part.RotationOffset * sitTargetOrient; |
2614 | newPos = newPos * Rotation; | 2616 | } |
2615 | // m_log.DebugFormat("New offset2 {0}", newPos); | ||
2616 | 2617 | ||
2617 | newPos += part.OffsetPosition; | 2618 | newPos += part.OffsetPosition; |
2618 | 2619 | ||
2619 | m_pos = newPos; | 2620 | m_pos = newPos; |
2621 | Rotation = newRot; | ||
2620 | ParentPosition = part.AbsolutePosition; | 2622 | ParentPosition = part.AbsolutePosition; |
2621 | } | 2623 | } |
2622 | else | 2624 | else |