aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs45
1 files changed, 24 insertions, 21 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index d4b4e0a..82214bf 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -445,33 +445,36 @@ 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 else // OS Mantis #4063 448 else
449 { // OS Mantis #4063 449 {
450 // OpenSim Mantis #4063. Obtain the correct position of a seated avatar. In addition 450 // Obtain the correct position of a seated avatar.
451 // to providing the correct position while the avatar is seated, this value will also 451 // In addition to providing the correct position while
452 // the avatar is seated, this value will also
452 // be used as the location to unsit to. 453 // be used as the location to unsit to.
453 // 454 //
454 // If m_parentID is not 0, assume we are a seated avatar and we should return the 455 // If m_parentID is not 0, assume we are a seated avatar
455 // position based on the sittarget offset and rotation of the prim we are seated on. 456 // and we should return the position based on the sittarget
457 // offset and rotation of the prim we are seated on.
456 // 458 //
457 // Generally, m_pos will contain the position of the avator in the sim unless the avatar 459 // Generally, m_pos will contain the position of the avatar
458 // is on a sit target. While on a sit target, m_pos will contain the desired offset 460 // in the sim unless the avatar is on a sit target. While
461 // on a sit target, m_pos will contain the desired offset
459 // without the parent rotation applied. 462 // without the parent rotation applied.
460 if (m_parentID != 0) // OS Mantis #4063 463 if (m_parentID != 0)
461 { 464 {
462 SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); // OS Mantis #4063 465 SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID);
463 if (part != null) // OS Mantis #4063 466 if (part != null)
464 { // OS Mantis #4064 467 {
465 return m_parentPosition + (m_pos * part.GetWorldRotation()); // OS Mantis #4063 468 return m_parentPosition + (m_pos * part.GetWorldRotation());
466 } 469 }
467 else // OS Mantis #4064 470 else
468 { // OS Mantis #4063 471 {
469 return m_parentPosition + m_pos; // OS Mantis #4064 472 return m_parentPosition + m_pos;
470 } // OS Mantis #4063 473 }
471 } // OS Mantis #4063 474 }
472 } // OS Mantis #4063 475 }
473 476
474 return m_pos; // OS Mantis #4063 477 return m_pos;
475 } 478 }
476 set 479 set
477 { 480 {