diff options
author | Kitto Flora | 2010-05-07 14:12:07 -0400 |
---|---|---|
committer | Kitto Flora | 2010-05-07 14:12:07 -0400 |
commit | add7abc1de2fce8db4c6d01cc4b5305bafa4bd87 (patch) | |
tree | 0702163cbc70db84315787c8caa98671b570df1a /OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |
parent | Fix Av jump motion S/W (diff) | |
download | opensim-SC-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.zip opensim-SC-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.gz opensim-SC-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.bz2 opensim-SC-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.xz |
Fix Mouse+WASD makes Av rise; Fix PREJUMP.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index be0e985..b43caf2 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -56,7 +56,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
56 | // protected string m_movementAnimation = "DEFAULT"; //KF: 'DEFAULT' does not exist! | 56 | // protected string m_movementAnimation = "DEFAULT"; //KF: 'DEFAULT' does not exist! |
57 | protected string m_movementAnimation = "CROUCH"; //KF: CROUCH ensures reliable Av Anim. init. | 57 | protected string m_movementAnimation = "CROUCH"; //KF: CROUCH ensures reliable Av Anim. init. |
58 | private int m_animTickFall; | 58 | private int m_animTickFall; |
59 | private int m_animTickJump; | 59 | // private int m_animTickJump; |
60 | public int m_animTickJump; // ScenePresence has to see this to control +Z force | ||
60 | 61 | ||
61 | /// <value> | 62 | /// <value> |
62 | /// The scene presence that this animator applies to | 63 | /// The scene presence that this animator applies to |
@@ -123,22 +124,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
123 | /// </summary> | 124 | /// </summary> |
124 | public void TrySetMovementAnimation(string anim) | 125 | public void TrySetMovementAnimation(string anim) |
125 | { | 126 | { |
126 | //Console.WriteLine("Updating movement animation to {0}", anim); | ||
127 | |||
128 | if (!m_scenePresence.IsChildAgent) | 127 | if (!m_scenePresence.IsChildAgent) |
129 | { | 128 | { |
130 | if (m_animations.TrySetDefaultAnimation( | 129 | if (m_animations.TrySetDefaultAnimation( |
131 | anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) | 130 | anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) |
132 | { | 131 | { |
133 | //Console.WriteLine("TSMA {0} success.", anim); | ||
134 | // 16384 is CHANGED_ANIMATION | 132 | // 16384 is CHANGED_ANIMATION |
135 | m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 }); | 133 | m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 }); |
136 | SendAnimPack(); | 134 | SendAnimPack(); |
137 | } | 135 | } |
138 | else | ||
139 | { | ||
140 | //Console.WriteLine("TSMA {0} fail.", anim); | ||
141 | } | ||
142 | } | 136 | } |
143 | } | 137 | } |
144 | 138 | ||
@@ -267,7 +261,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
267 | m_animTickJump = Environment.TickCount; | 261 | m_animTickJump = Environment.TickCount; |
268 | return "PREJUMP"; | 262 | return "PREJUMP"; |
269 | } | 263 | } |
270 | else if (Environment.TickCount - m_animTickJump > PREJUMP_DELAY * 1000.0f) | 264 | else if (Environment.TickCount - m_animTickJump > PREJUMP_DELAY * 800.0f) |
271 | { | 265 | { |
272 | // Start actual jump | 266 | // Start actual jump |
273 | if (m_animTickJump == -1) | 267 | if (m_animTickJump == -1) |
@@ -317,7 +311,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
317 | public void UpdateMovementAnimations() | 311 | public void UpdateMovementAnimations() |
318 | { | 312 | { |
319 | m_movementAnimation = GetMovementAnimation(); | 313 | m_movementAnimation = GetMovementAnimation(); |
320 | //Console.WriteLine("UMA got {0}", m_movementAnimation); | ||
321 | if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump) | 314 | if (m_movementAnimation == "PREJUMP" && !m_scenePresence.Scene.m_usePreJump) |
322 | { | 315 | { |
323 | // This was the previous behavior before PREJUMP | 316 | // This was the previous behavior before PREJUMP |