diff options
author | Justin Clark-Casey (justincc) | 2012-01-07 00:17:40 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-01-07 00:17:40 +0000 |
commit | c5c079f6aa731ae6505299c11792f4d1d6ea3e88 (patch) | |
tree | 152ea0d7cfc5b4800ae675bb2ef0cf76de12a0ed /OpenSim/Region | |
parent | Fix some syntax issues (diff) | |
download | opensim-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')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 13 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 |
2 files changed, 10 insertions, 9 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; |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 42cd4be..8ebb7a6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1274,8 +1274,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1274 | public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) | 1274 | public void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs agentData) |
1275 | { | 1275 | { |
1276 | // m_log.DebugFormat( | 1276 | // m_log.DebugFormat( |
1277 | // "[SCENE PRESENCE]: In {0} received agent update from {1}", | 1277 | // "[SCENE PRESENCE]: In {0} received agent update from {1}, flags {2}", |
1278 | // Scene.RegionInfo.RegionName, remoteClient.Name); | 1278 | // Scene.RegionInfo.RegionName, remoteClient.Name, agentData.ControlFlags); |
1279 | 1279 | ||
1280 | if (IsChildAgent) | 1280 | if (IsChildAgent) |
1281 | { | 1281 | { |
@@ -2312,6 +2312,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2312 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> | 2312 | /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> |
2313 | public void AddNewMovement(Vector3 vec) | 2313 | public void AddNewMovement(Vector3 vec) |
2314 | { | 2314 | { |
2315 | // m_log.DebugFormat("[SCENE PRESENCE]: Adding new movement {0} for {1}", vec, Name); | ||
2316 | |||
2315 | Vector3 direc = vec * Rotation; | 2317 | Vector3 direc = vec * Rotation; |
2316 | direc.Normalize(); | 2318 | direc.Normalize(); |
2317 | 2319 | ||