diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 |
2 files changed, 21 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index c8ecc9b..2ff3fb7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -797,7 +797,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
797 | m_rotationOffset = actor.Orientation; | 797 | m_rotationOffset = actor.Orientation; |
798 | } | 798 | } |
799 | } | 799 | } |
800 | 800 | ||
801 | // float roll, pitch, yaw = 0; | ||
802 | // m_rotationOffset.GetEulerAngles(out roll, out pitch, out yaw); | ||
803 | // | ||
804 | // m_log.DebugFormat( | ||
805 | // "[SCENE OBJECT PART]: Got euler {0} for RotationOffset on {1} {2}", | ||
806 | // new Vector3(roll, pitch, yaw), Name, LocalId); | ||
807 | |||
801 | return m_rotationOffset; | 808 | return m_rotationOffset; |
802 | } | 809 | } |
803 | 810 | ||
@@ -834,6 +841,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
834 | m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message); | 841 | m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message); |
835 | } | 842 | } |
836 | } | 843 | } |
844 | |||
845 | // float roll, pitch, yaw = 0; | ||
846 | // m_rotationOffset.GetEulerAngles(out roll, out pitch, out yaw); | ||
847 | // | ||
848 | // m_log.DebugFormat( | ||
849 | // "[SCENE OBJECT PART]: Set euler {0} for RotationOffset on {1} {2}", | ||
850 | // new Vector3(roll, pitch, yaw), Name, LocalId); | ||
837 | } | 851 | } |
838 | } | 852 | } |
839 | 853 | ||
@@ -4495,12 +4509,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
4495 | PhysActor = null; | 4509 | PhysActor = null; |
4496 | } | 4510 | } |
4497 | 4511 | ||
4512 | /// <summary> | ||
4513 | /// This updates the part's rotation and sends out an update to clients if necessary. | ||
4514 | /// </summary> | ||
4515 | /// <param name="rot"></param> | ||
4498 | public void UpdateRotation(Quaternion rot) | 4516 | public void UpdateRotation(Quaternion rot) |
4499 | { | 4517 | { |
4500 | if ((rot.X != RotationOffset.X) || | 4518 | if (rot != RotationOffset) |
4501 | (rot.Y != RotationOffset.Y) || | ||
4502 | (rot.Z != RotationOffset.Z) || | ||
4503 | (rot.W != RotationOffset.W)) | ||
4504 | { | 4519 | { |
4505 | RotationOffset = rot; | 4520 | RotationOffset = rot; |
4506 | 4521 | ||
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ee6c708..38cdd77 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1769,7 +1769,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1769 | 1769 | ||
1770 | Rotation = Quaternion.CreateFromEulers(angle); | 1770 | Rotation = Quaternion.CreateFromEulers(angle); |
1771 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); | 1771 | // m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); |
1772 | 1772 | ||
1773 | Vector3 agent_control_v3 = new Vector3(); | 1773 | Vector3 agent_control_v3 = new Vector3(); |
1774 | HandleMoveToTargetUpdate(ref agent_control_v3); | 1774 | HandleMoveToTargetUpdate(ref agent_control_v3); |
1775 | AddNewMovement(agent_control_v3); | 1775 | AddNewMovement(agent_control_v3); |