aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-07 00:17:40 +0000
committerJustin Clark-Casey (justincc)2012-01-07 00:17:40 +0000
commitc5c079f6aa731ae6505299c11792f4d1d6ea3e88 (patch)
tree152ea0d7cfc5b4800ae675bb2ef0cf76de12a0ed /OpenSim/Region/Framework/Scenes/Animation
parentFix some syntax issues (diff)
downloadopensim-SC_OLD-c5c079f6aa731ae6505299c11792f4d1d6ea3e88.zip
opensim-SC_OLD-c5c079f6aa731ae6505299c11792f4d1d6ea3e88.tar.gz
opensim-SC_OLD-c5c079f6aa731ae6505299c11792f4d1d6ea3e88.tar.bz2
opensim-SC_OLD-c5c079f6aa731ae6505299c11792f4d1d6ea3e88.tar.xz
Fix bug where tapping home to stop falling would stop any avatar movement other than falling again.
Addresses http://opensimulator.org/mantis/view.php?id=5839
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs13
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index eda085f..ff5f731 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
223 m_animTickFall = 0; 223 m_animTickFall = 0;
224 m_animTickJump = 0; 224 m_animTickJump = 0;
225 m_jumping = false; 225 m_jumping = false;
226 m_falling = true; 226 m_falling = false;
227 m_jumpVelocity = 0f; 227 m_jumpVelocity = 0f;
228 actor.Selected = false; 228 actor.Selected = false;
229 m_fallHeight = actor.Position.Z; // save latest flying height 229 m_fallHeight = actor.Position.Z; // save latest flying height
@@ -238,10 +238,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
238 } 238 }
239 else if (move.Z < 0f) 239 else if (move.Z < 0f)
240 { 240 {
241 if (actor != null && actor.IsColliding) 241 if (actor != null && actor.IsColliding)
242 {
243 return "LAND"; 242 return "LAND";
244 }
245 else 243 else
246 return "HOVER_DOWN"; 244 return "HOVER_DOWN";
247 } 245 }
@@ -260,7 +258,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
260 float fallElapsed = (float)(Environment.TickCount - m_animTickFall); 258 float fallElapsed = (float)(Environment.TickCount - m_animTickFall);
261 float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f; 259 float fallVelocity = (actor != null) ? actor.Velocity.Z : 0.0f;
262 260
263 if (!m_jumping && (fallVelocity < -3.0f) ) m_falling = true; 261 if (!m_jumping && (fallVelocity < -3.0f))
262 m_falling = true;
264 263
265 if (m_animTickFall == 0 || (fallVelocity >= 0.0f)) 264 if (m_animTickFall == 0 || (fallVelocity >= 0.0f))
266 { 265 {
@@ -297,9 +296,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
297 return "PREJUMP"; 296 return "PREJUMP";
298 } 297 }
299 298
300 if(m_jumping) 299 if (m_jumping)
301 { 300 {
302 if ( (jumptime > (JUMP_PERIOD * 1.5f)) && actor.IsColliding) 301 if ((jumptime > (JUMP_PERIOD * 1.5f)) && actor.IsColliding)
303 { 302 {
304 // end jumping 303 // end jumping
305 m_jumping = false; 304 m_jumping = false;