aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2015-09-30 20:37:14 +0100
committerUbitUmarov2015-09-30 20:37:14 +0100
commit6df75a927cfa36d0f3876653033a9d12e3e78dfd (patch)
tree62399cfc082e78b2123fc565839c5c1b14ff4391 /OpenSim/Region/Framework/Scenes
parent add get method on physics actors PIDHoverActive (diff)
downloadopensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.zip
opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.gz
opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.bz2
opensim-SC-6df75a927cfa36d0f3876653033a9d12e3e78dfd.tar.xz
let hoverheight rest position be a falling state
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
2 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index e80a33b..13d4562 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -399,6 +399,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation
399 { 399 {
400 float fallVelocity = actor.Velocity.Z; 400 float fallVelocity = actor.Velocity.Z;
401 401
402 // if stable on Hover assume falling
403 if(actor.PIDHoverActive && fallVelocity < 0.05f)
404 {
405 Falling = true;
406 currentControlState = motionControlStates.falling;
407 m_lastFallVelocity = fallVelocity;
408 return "FALLDOWN";
409 }
410
402 if (fallVelocity < -2.5f) 411 if (fallVelocity < -2.5f)
403 Falling = true; 412 Falling = true;
404 413
@@ -431,7 +440,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
431 440
432 #region Jumping // section added for jumping... 441 #region Jumping // section added for jumping...
433 442
434 if (isColliding && heldUp && currentControlState != motionControlStates.jumping) 443 if (isColliding && heldUp && currentControlState != motionControlStates.jumping && !actor.PIDHoverActive)
435 { 444 {
436 // Start jumping, prejump 445 // Start jumping, prejump
437 currentControlState = motionControlStates.jumping; 446 currentControlState = motionControlStates.jumping;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 4252bd6..9996f6e 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3363,7 +3363,8 @@ namespace OpenSim.Region.Framework.Scenes
3363 3363
3364 // m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name); 3364 // m_log.DebugFormat("[SCENE PRESENCE]: Force to apply before modification was {0} for {1}", direc, Name);
3365 3365
3366 if (Animator.currentControlState == ScenePresenceAnimator.motionControlStates.falling) 3366 if (Animator.currentControlState == ScenePresenceAnimator.motionControlStates.falling
3367 && (PhysicsActor == null || !PhysicsActor.PIDHoverActive))
3367 { 3368 {
3368 if (breaking) 3369 if (breaking)
3369 direc.Z = -9999f; //hack to tell physics to stop on Z 3370 direc.Z = -9999f; //hack to tell physics to stop on Z