diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f2aa0c5..cda438f 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1841,32 +1841,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
1841 | bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || | 1841 | bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || |
1842 | ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); | 1842 | ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); |
1843 | 1843 | ||
1844 | |||
1845 | //m_log.Debug("[CONTROL]: " +flags); | 1844 | //m_log.Debug("[CONTROL]: " +flags); |
1846 | // Applies a satisfying roll effect to the avatar when flying. | 1845 | // Applies a satisfying roll effect to the avatar when flying. |
1847 | if (((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) != 0) && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0)) | 1846 | if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) != 0 && (flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_POS) != 0) |
1848 | { | 1847 | { |
1849 | 1848 | ApplyFlyingRoll( | |
1850 | ApplyFlyingRoll(FLY_ROLL_RADIANS_PER_UPDATE, ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0), ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0)); | 1849 | FLY_ROLL_RADIANS_PER_UPDATE, |
1851 | 1850 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0, | |
1852 | 1851 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0); | |
1853 | } | 1852 | } |
1854 | else if (((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) != 0) && | 1853 | else if ((flags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) != 0 && |
1855 | ((flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0)) | 1854 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_YAW_NEG) != 0) |
1856 | { | 1855 | { |
1857 | ApplyFlyingRoll(-FLY_ROLL_RADIANS_PER_UPDATE, ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0), ((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0)); | 1856 | ApplyFlyingRoll( |
1858 | 1857 | -FLY_ROLL_RADIANS_PER_UPDATE, | |
1859 | 1858 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) != 0, | |
1859 | (flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0); | ||
1860 | } | 1860 | } |
1861 | else | 1861 | else |
1862 | { | 1862 | { |
1863 | if (m_AngularVelocity.Z != 0) | 1863 | if (m_AngularVelocity.Z != 0) |
1864 | m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); | 1864 | m_AngularVelocity.Z += CalculateFlyingRollResetToZero(FLY_ROLL_RESET_RADIANS_PER_UPDATE); |
1865 | 1865 | } | |
1866 | } | ||
1867 | |||
1868 | |||
1869 | |||
1870 | 1866 | ||
1871 | if (Flying && IsColliding && controlland) | 1867 | if (Flying && IsColliding && controlland) |
1872 | { | 1868 | { |
@@ -2584,7 +2580,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2584 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> | 2580 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> |
2585 | public void AddNewMovement(Vector3 vec) | 2581 | public void AddNewMovement(Vector3 vec) |
2586 | { | 2582 | { |
2587 | // m_log.DebugFormat("[SCENE PRESENCE]: Adding new movement {0} for {1}", vec, Name); | 2583 | // m_log.DebugFormat( |
2584 | // "[SCENE PRESENCE]: Adding new movement {0} with rotation {1} for {2}", vec, Rotation, Name); | ||
2588 | 2585 | ||
2589 | Vector3 direc = vec * Rotation; | 2586 | Vector3 direc = vec * Rotation; |
2590 | direc.Normalize(); | 2587 | direc.Normalize(); |
@@ -2604,6 +2601,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2604 | 2601 | ||
2605 | direc *= 0.03f * 128f * SpeedModifier; | 2602 | direc *= 0.03f * 128f * SpeedModifier; |
2606 | 2603 | ||
2604 | // m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name); | ||
2605 | |||
2607 | if (PhysicsActor != null) | 2606 | if (PhysicsActor != null) |
2608 | { | 2607 | { |
2609 | if (Flying) | 2608 | if (Flying) |
@@ -2637,6 +2636,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2637 | } | 2636 | } |
2638 | } | 2637 | } |
2639 | 2638 | ||
2639 | // m_log.DebugFormat("[SCENE PRESENCE]: Setting force to apply to {0} for {1}", direc, Name); | ||
2640 | |||
2640 | // TODO: Add the force instead of only setting it to support multiple forces per frame? | 2641 | // TODO: Add the force instead of only setting it to support multiple forces per frame? |
2641 | m_forceToApply = direc; | 2642 | m_forceToApply = direc; |
2642 | Animator.UpdateMovementAnimations(); | 2643 | Animator.UpdateMovementAnimations(); |