aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs17
2 files changed, 24 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index f54b071..e4e5ab6 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
42 /// </summary> 42 /// </summary>
43 public class ScenePresenceAnimator 43 public class ScenePresenceAnimator
44 { 44 {
45// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 public AnimationSet Animations 47 public AnimationSet Animations
48 { 48 {
@@ -181,8 +181,8 @@ TrySetMovementAnimation("STAND");
181 bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG); 181 bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG);
182 bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS); 182 bool heldLeft = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_POS);
183 bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG); 183 bool heldRight = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_LEFT_NEG);
184 bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; 184 //bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
185 bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT; 185 //bool heldTurnRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_RIGHT;
186 bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS; 186 bool heldUp = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_POS) == AgentManager.ControlFlags.AGENT_CONTROL_UP_POS;
187 bool heldDown = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG; 187 bool heldDown = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG;
188 //bool flying = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) == AgentManager.ControlFlags.AGENT_CONTROL_FLY; 188 //bool flying = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) == AgentManager.ControlFlags.AGENT_CONTROL_FLY;
@@ -413,10 +413,10 @@ TrySetMovementAnimation("STAND");
413 // Not walking 413 // Not walking
414 if (move.Z < 0) 414 if (move.Z < 0)
415 return "CROUCH"; 415 return "CROUCH";
416 else if (heldTurnLeft) 416// else if (heldTurnLeft)
417 return "TURNLEFT"; 417// return "TURNLEFT";
418 else if (heldTurnRight) 418// else if (heldTurnRight)
419 return "TURNRIGHT"; 419// return "TURNRIGHT";
420 else 420 else
421 return "STAND"; 421 return "STAND";
422 } 422 }
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)