aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-03 00:27:21 +0000
committerJustin Clark-Casey (justincc)2011-12-03 00:27:21 +0000
commit5ba8ca5662efb9c4f595e9a703535661d72e5b2f (patch)
treeda1b363918ce541120a90129c9455263f80c9058 /OpenSim/Region/Framework
parentStop SP.HandleAgentUpdate() and PhysicsCollisionUpdate() from being processed... (diff)
downloadopensim-SC_OLD-5ba8ca5662efb9c4f595e9a703535661d72e5b2f.zip
opensim-SC_OLD-5ba8ca5662efb9c4f595e9a703535661d72e5b2f.tar.gz
opensim-SC_OLD-5ba8ca5662efb9c4f595e9a703535661d72e5b2f.tar.bz2
opensim-SC_OLD-5ba8ca5662efb9c4f595e9a703535661d72e5b2f.tar.xz
Rename ScenePresenceAnimator.GetMovementAnimation() -> DetermineMovementAnimation() for better code readability
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index a2805d2..cac936c 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -59,6 +59,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
59 get { return m_movementAnimation; } 59 get { return m_movementAnimation; }
60 } 60 }
61 protected string m_movementAnimation = "CROUCH"; 61 protected string m_movementAnimation = "CROUCH";
62
62 private int m_animTickFall; 63 private int m_animTickFall;
63 public int m_animTickJump; // ScenePresence has to see this to control +Z force 64 public int m_animTickJump; // ScenePresence has to see this to control +Z force
64 public bool m_jumping = false; 65 public bool m_jumping = false;
@@ -146,6 +147,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
146 { 147 {
147 if (!m_scenePresence.IsChildAgent) 148 if (!m_scenePresence.IsChildAgent)
148 { 149 {
150// m_log.DebugFormat(
151// "[SCENE PRESENCE ANIMATOR]: Setting movement animation {0} for {1}",
152// anim, m_scenePresence.Name);
153
149 if (m_animations.TrySetDefaultAnimation( 154 if (m_animations.TrySetDefaultAnimation(
150 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) 155 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID))
151 { 156 {
@@ -169,7 +174,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
169 /// <summary> 174 /// <summary>
170 /// This method determines the proper movement related animation 175 /// This method determines the proper movement related animation
171 /// </summary> 176 /// </summary>
172 public string GetMovementAnimation() 177 public string DetermineMovementAnimation()
173 { 178 {
174 const float FALL_DELAY = 800f; 179 const float FALL_DELAY = 800f;
175 const float PREJUMP_DELAY = 200f; 180 const float PREJUMP_DELAY = 200f;
@@ -283,7 +288,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
283 int jumptime; 288 int jumptime;
284 jumptime = Environment.TickCount - m_animTickJump; 289 jumptime = Environment.TickCount - m_animTickJump;
285 290
286
287 if ((move.Z > 0f) && (!m_jumping)) 291 if ((move.Z > 0f) && (!m_jumping))
288 { 292 {
289 // Start jumping, prejump 293 // Start jumping, prejump
@@ -387,6 +391,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
387 #endregion Ground Movement 391 #endregion Ground Movement
388 392
389 m_falling = false; 393 m_falling = false;
394
390 return m_movementAnimation; 395 return m_movementAnimation;
391 } 396 }
392 397
@@ -395,7 +400,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
395 /// </summary> 400 /// </summary>
396 public void UpdateMovementAnimations() 401 public void UpdateMovementAnimations()
397 { 402 {
398 m_movementAnimation = GetMovementAnimation(); 403 m_movementAnimation = DetermineMovementAnimation();
399 TrySetMovementAnimation(m_movementAnimation); 404 TrySetMovementAnimation(m_movementAnimation);
400 } 405 }
401 406