aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-11-30 01:44:30 +0000
committerJustin Clark-Casey (justincc)2013-11-30 01:44:30 +0000
commit4cde02a2a36dd7f6afce49e5e6db78af021ab14b (patch)
tree531062a5641e071376d01f99a6b91df63ccd3bce /OpenSim/Region/Framework/Scenes/Animation
parentRemove nudgehack from SP.HandleAgentUpdate by making MovementFlag a uint rath... (diff)
downloadopensim-SC_OLD-4cde02a2a36dd7f6afce49e5e6db78af021ab14b.zip
opensim-SC_OLD-4cde02a2a36dd7f6afce49e5e6db78af021ab14b.tar.gz
opensim-SC_OLD-4cde02a2a36dd7f6afce49e5e6db78af021ab14b.tar.bz2
opensim-SC_OLD-4cde02a2a36dd7f6afce49e5e6db78af021ab14b.tar.xz
Implement most effects of AGENT_CONTROL_STOP
AGENT_CONTROL_STOP is specified to SP.HandleAgentUpdate if the user holds down the space bar on a viewer. For a stopped avatar, this prevents fly or walk/run (though not rotate) until released. For a walking/running avatar, this reduces movement to half speed. For a flying avatar, this stops the avatar. These are observed behaviours on the LL grid - there was no previous OpenSimulator implementation This commit introduces an optional parameter to SP.AddNewMovement(), which means that it will no longer compile on .NET 3.5 or earlier versions of Mono than 2.8 Currently, this does not work for jumping, and if used whilst flying the avatar continues the fly animation even though it does not move
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 3b5a5bd..5beee73 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -403,11 +403,18 @@ namespace OpenSim.Region.Framework.Scenes.Animation
403 Falling = false; 403 Falling = false;
404 // Walking / crouchwalking / running 404 // Walking / crouchwalking / running
405 if (move.Z < 0f) 405 if (move.Z < 0f)
406 {
406 return "CROUCHWALK"; 407 return "CROUCHWALK";
407 else if (m_scenePresence.SetAlwaysRun) 408 }
408 return "RUN"; 409 // We need to prevent these animations if the user tries to make their avatar walk or run whilst
409 else 410 // specifying AGENT_CONTROL_STOP (pressing down space on viewers).
410 return "WALK"; 411 else if (!m_scenePresence.AgentControlStopActive)
412 {
413 if (m_scenePresence.SetAlwaysRun)
414 return "RUN";
415 else
416 return "WALK";
417 }
411 } 418 }
412 else if (!m_jumping) 419 else if (!m_jumping)
413 { 420 {
@@ -435,6 +442,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
435 /// <returns>'true' if the animation was changed</returns> 442 /// <returns>'true' if the animation was changed</returns>
436 public bool UpdateMovementAnimations() 443 public bool UpdateMovementAnimations()
437 { 444 {
445// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Updating movement animations for {0}", m_scenePresence.Name);
446
438 bool ret = false; 447 bool ret = false;
439 lock (m_animations) 448 lock (m_animations)
440 { 449 {