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/SceneObjectPart.cs21
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs37
2 files changed, 55 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b8c209e..ffde415 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -141,6 +141,27 @@ namespace OpenSim.Region.Framework.Scenes
141 /// Dynamic attributes can be created and deleted as required. 141 /// Dynamic attributes can be created and deleted as required.
142 /// </summary> 142 /// </summary>
143 public DAMap DynAttrs { get; set; } 143 public DAMap DynAttrs { get; set; }
144
145 private DOMap m_dynObjs;
146
147 /// <summary>
148 /// Dynamic objects that can be created and deleted as required.
149 /// </summary>
150 public DOMap DynObjs
151 {
152 get
153 {
154 if (m_dynObjs == null)
155 m_dynObjs = new DOMap();
156
157 return m_dynObjs;
158 }
159
160 set
161 {
162 m_dynObjs = value;
163 }
164 }
144 165
145 /// <value> 166 /// <value>
146 /// Is this a root part? 167 /// Is this a root part?
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cda438f..3e3b3af 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -590,12 +590,25 @@ namespace OpenSim.Region.Framework.Scenes
590*/ 590*/
591 private Quaternion m_bodyRot = Quaternion.Identity; 591 private Quaternion m_bodyRot = Quaternion.Identity;
592 592
593 /// <summary>
594 /// The rotation of the avatar.
595 /// </summary>
596 /// <remarks>
597 /// If the avatar is not sitting, this is with respect to the world
598 /// If the avatar is sitting, this is a with respect to the part that it's sitting upon (a local rotation).
599 /// If you always want the world rotation, use GetWorldRotation()
600 /// </remarks>
593 public Quaternion Rotation 601 public Quaternion Rotation
594 { 602 {
595 get { return m_bodyRot; } 603 get
604 {
605 return m_bodyRot;
606 }
607
596 set 608 set
597 { 609 {
598 m_bodyRot = value; 610 m_bodyRot = value;
611
599 if (PhysicsActor != null) 612 if (PhysicsActor != null)
600 { 613 {
601 try 614 try
@@ -654,6 +667,26 @@ namespace OpenSim.Region.Framework.Scenes
654 set { m_health = value; } 667 set { m_health = value; }
655 } 668 }
656 669
670 /// <summary>
671 /// Gets the world rotation of this presence.
672 /// </summary>
673 /// <remarks>
674 /// Unlike Rotation, this returns the world rotation no matter whether the avatar is sitting on a prim or not.
675 /// </remarks>
676 /// <returns></returns>
677 public Quaternion GetWorldRotation()
678 {
679 if (IsSatOnObject)
680 {
681 SceneObjectPart sitPart = ParentPart;
682
683 if (sitPart != null)
684 return sitPart.GetWorldRotation() * Rotation;
685 }
686
687 return Rotation;
688 }
689
657 public void AdjustKnownSeeds() 690 public void AdjustKnownSeeds()
658 { 691 {
659 Dictionary<ulong, string> seeds; 692 Dictionary<ulong, string> seeds;
@@ -755,8 +788,6 @@ namespace OpenSim.Region.Framework.Scenes
755 788
756 #endregion 789 #endregion
757 790
758
759
760 #region Constructor(s) 791 #region Constructor(s)
761 792
762 public ScenePresence( 793 public ScenePresence(