diff options
author | opensim mirror account | 2010-11-26 18:10:02 -0800 |
---|---|---|
committer | opensim mirror account | 2010-11-26 18:10:02 -0800 |
commit | 2f3fcd4b72d400dc8b3c8b2d4ce55bb83175f1ee (patch) | |
tree | 06140bc321e2c37925d19df390840ed81c958847 | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
parent | llUnsit position fix 4063 (updated 11-20-2010) (diff) | |
download | opensim-SC_OLD-2f3fcd4b72d400dc8b3c8b2d4ce55bb83175f1ee.zip opensim-SC_OLD-2f3fcd4b72d400dc8b3c8b2d4ce55bb83175f1ee.tar.gz opensim-SC_OLD-2f3fcd4b72d400dc8b3c8b2d4ce55bb83175f1ee.tar.bz2 opensim-SC_OLD-2f3fcd4b72d400dc8b3c8b2d4ce55bb83175f1ee.tar.xz |
Merge branch 'master' of /var/git/opensim/
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 4a48ac3..d4b4e0a 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -445,8 +445,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
445 | PhysicsActor actor = m_physicsActor; | 445 | PhysicsActor actor = m_physicsActor; |
446 | if (actor != null) | 446 | if (actor != null) |
447 | m_pos = actor.Position; | 447 | m_pos = actor.Position; |
448 | 448 | else // OS Mantis #4063 | |
449 | return m_parentPosition + m_pos; | 449 | { // OS Mantis #4063 |
450 | // OpenSim Mantis #4063. Obtain the correct position of a seated avatar. In addition | ||
451 | // to providing the correct position while the avatar is seated, this value will also | ||
452 | // be used as the location to unsit to. | ||
453 | // | ||
454 | // If m_parentID is not 0, assume we are a seated avatar and we should return the | ||
455 | // position based on the sittarget offset and rotation of the prim we are seated on. | ||
456 | // | ||
457 | // Generally, m_pos will contain the position of the avator in the sim unless the avatar | ||
458 | // is on a sit target. While on a sit target, m_pos will contain the desired offset | ||
459 | // without the parent rotation applied. | ||
460 | if (m_parentID != 0) // OS Mantis #4063 | ||
461 | { | ||
462 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); // OS Mantis #4063 | ||
463 | if (part != null) // OS Mantis #4063 | ||
464 | { // OS Mantis #4064 | ||
465 | return m_parentPosition + (m_pos * part.GetWorldRotation()); // OS Mantis #4063 | ||
466 | } | ||
467 | else // OS Mantis #4064 | ||
468 | { // OS Mantis #4063 | ||
469 | return m_parentPosition + m_pos; // OS Mantis #4064 | ||
470 | } // OS Mantis #4063 | ||
471 | } // OS Mantis #4063 | ||
472 | } // OS Mantis #4063 | ||
473 | |||
474 | return m_pos; // OS Mantis #4063 | ||
450 | } | 475 | } |
451 | set | 476 | set |
452 | { | 477 | { |