aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorMelanie2011-10-20 23:11:53 +0200
committerMelanie2011-10-20 23:11:53 +0200
commitfd0e65b0b17c2985d4dd8199e16fbc84d9929dad (patch)
tree3ae06db6a88884f1e80af930e8b73f471e3f159a /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge branch 'master' into bigmerge (diff)
downloadopensim-SC-fd0e65b0b17c2985d4dd8199e16fbc84d9929dad.zip
opensim-SC-fd0e65b0b17c2985d4dd8199e16fbc84d9929dad.tar.gz
opensim-SC-fd0e65b0b17c2985d4dd8199e16fbc84d9929dad.tar.bz2
opensim-SC-fd0e65b0b17c2985d4dd8199e16fbc84d9929dad.tar.xz
Fix up the animator and ScenePresence to like each other again
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 975d855..1f39c3f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2703,6 +2703,19 @@ namespace OpenSim.Region.Framework.Scenes
2703 Vector3 direc = vec * Rotation; 2703 Vector3 direc = vec * Rotation;
2704 direc.Normalize(); 2704 direc.Normalize();
2705 2705
2706 if (PhysicsActor.Flying != m_flyingOld) // add for fly velocity control
2707 {
2708 m_flyingOld = PhysicsActor.Flying; // add for fly velocity control
2709 if (!PhysicsActor.Flying)
2710 m_wasFlying = true; // add for fly velocity control
2711 }
2712
2713 if (PhysicsActor.IsColliding == true)
2714 m_wasFlying = false; // add for fly velocity control
2715
2716 if ((vec.Z == 0f) && !PhysicsActor.Flying)
2717 direc.Z = 0f; // Prevent camera WASD up.
2718
2706 direc *= 0.03f * 128f * SpeedModifier; 2719 direc *= 0.03f * 128f * SpeedModifier;
2707 2720
2708 if (PhysicsActor != null) 2721 if (PhysicsActor != null)
@@ -2721,6 +2734,10 @@ namespace OpenSim.Region.Framework.Scenes
2721 // m_log.Info("[AGENT]: Stop Flying"); 2734 // m_log.Info("[AGENT]: Stop Flying");
2722 //} 2735 //}
2723 } 2736 }
2737 if (Animator.m_falling && m_wasFlying) // if falling from flying, disable motion add
2738 {
2739 direc *= 0.0f;
2740 }
2724 else if (!PhysicsActor.Flying && PhysicsActor.IsColliding) 2741 else if (!PhysicsActor.Flying && PhysicsActor.IsColliding)
2725 { 2742 {
2726 if (direc.Z > 2.0f) 2743 if (direc.Z > 2.0f)