diff options
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1e749da..24c809b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -464,33 +464,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
464 | // if (actor != null) | 464 | // if (actor != null) |
465 | if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! | 465 | if ((actor != null) && (m_parentID == 0)) // KF Do NOT update m_pos here if Av is sitting! |
466 | m_pos = actor.Position; | 466 | m_pos = actor.Position; |
467 | else // OS Mantis #4063 | 467 | else |
468 | { // OS Mantis #4063 | 468 | { |
469 | // OpenSim Mantis #4063. Obtain the correct position of a seated avatar. In addition | 469 | // Obtain the correct position of a seated avatar. |
470 | // to providing the correct position while the avatar is seated, this value will also | 470 | // In addition to providing the correct position while |
471 | // the avatar is seated, this value will also | ||
471 | // be used as the location to unsit to. | 472 | // be used as the location to unsit to. |
472 | // | 473 | // |
473 | // If m_parentID is not 0, assume we are a seated avatar and we should return the | 474 | // If m_parentID is not 0, assume we are a seated avatar |
474 | // position based on the sittarget offset and rotation of the prim we are seated on. | 475 | // and we should return the position based on the sittarget |
476 | // offset and rotation of the prim we are seated on. | ||
475 | // | 477 | // |
476 | // Generally, m_pos will contain the position of the avator in the sim unless the avatar | 478 | // Generally, m_pos will contain the position of the avatar |
477 | // is on a sit target. While on a sit target, m_pos will contain the desired offset | 479 | // in the sim unless the avatar is on a sit target. While |
480 | // on a sit target, m_pos will contain the desired offset | ||
478 | // without the parent rotation applied. | 481 | // without the parent rotation applied. |
479 | if (m_parentID != 0) // OS Mantis #4063 | 482 | if (m_parentID != 0) |
480 | { | 483 | { |
481 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); // OS Mantis #4063 | 484 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); |
482 | if (part != null) // OS Mantis #4063 | 485 | if (part != null) |
483 | { // OS Mantis #4064 | 486 | { |
484 | return m_parentPosition + (m_pos * part.GetWorldRotation()); // OS Mantis #4063 | 487 | return m_parentPosition + (m_pos * part.GetWorldRotation()); |
485 | } | 488 | } |
486 | else // OS Mantis #4064 | 489 | else |
487 | { // OS Mantis #4063 | 490 | { |
488 | return m_parentPosition + m_pos; // OS Mantis #4064 | 491 | return m_parentPosition + m_pos; |
489 | } // OS Mantis #4063 | 492 | } |
490 | } // OS Mantis #4063 | 493 | } |
491 | } // OS Mantis #4063 | 494 | } |
492 | 495 | ||
493 | return m_pos; // OS Mantis #4063 | 496 | return m_pos; |
494 | } | 497 | } |
495 | set | 498 | set |
496 | { | 499 | { |