aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorKitto Flora2010-05-07 14:12:07 -0400
committerKitto Flora2010-05-07 14:12:07 -0400
commitadd7abc1de2fce8db4c6d01cc4b5305bafa4bd87 (patch)
tree0702163cbc70db84315787c8caa98671b570df1a /OpenSim/Region/Framework
parentFix Av jump motion S/W (diff)
downloadopensim-SC_OLD-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.zip
opensim-SC_OLD-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.gz
opensim-SC_OLD-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.bz2
opensim-SC_OLD-add7abc1de2fce8db4c6d01cc4b5305bafa4bd87.tar.xz
Fix Mouse+WASD makes Av rise; Fix PREJUMP.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs23
3 files changed, 19 insertions, 19 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
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index db073e8..665fb4c 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -613,7 +613,7 @@ namespace OpenSim.Region.Framework.Scenes
613 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 613 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
614 // TODO: Change default to true once the feature is supported 614 // TODO: Change default to true once the feature is supported
615 m_usePreJump = startupConfig.GetBoolean("enableprejump", false); 615 m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
616 616 m_usePreJump = true; // Above line fails!?
617 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 617 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
618 if (RegionInfo.NonphysPrimMax > 0) 618 if (RegionInfo.NonphysPrimMax > 0)
619 { 619 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 2603fe1..565438d 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -665,7 +665,7 @@ namespace OpenSim.Region.Framework.Scenes
665 CreateSceneViewer(); 665 CreateSceneViewer();
666 m_animator = new ScenePresenceAnimator(this); 666 m_animator = new ScenePresenceAnimator(this);
667 } 667 }
668 668
669 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() 669 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this()
670 { 670 {
671 m_rootRegionHandle = reginfo.RegionHandle; 671 m_rootRegionHandle = reginfo.RegionHandle;
@@ -1459,7 +1459,6 @@ namespace OpenSim.Region.Framework.Scenes
1459 } 1459 }
1460 i++; 1460 i++;
1461 } 1461 }
1462
1463 //Paupaw:Do Proper PID for Autopilot here 1462 //Paupaw:Do Proper PID for Autopilot here
1464 if (bResetMoveToPosition) 1463 if (bResetMoveToPosition)
1465 { 1464 {
@@ -2433,10 +2432,11 @@ namespace OpenSim.Region.Framework.Scenes
2433 Rotation = rotation; 2432 Rotation = rotation;
2434 Vector3 direc = vec * rotation; 2433 Vector3 direc = vec * rotation;
2435 direc.Normalize(); 2434 direc.Normalize();
2435 PhysicsActor actor = m_physicsActor;
2436 if ((vec.Z == 0f) && !actor.Flying) direc.Z = 0f; // Prevent camera WASD up.
2436 2437
2437 direc *= 0.03f * 128f * m_speedModifier; 2438 direc *= 0.03f * 128f * m_speedModifier;
2438 2439
2439 PhysicsActor actor = m_physicsActor;
2440 if (actor != null) 2440 if (actor != null)
2441 { 2441 {
2442 if (actor.Flying) 2442 if (actor.Flying)
@@ -2458,11 +2458,18 @@ namespace OpenSim.Region.Framework.Scenes
2458 { 2458 {
2459 if (direc.Z > 2.0f) 2459 if (direc.Z > 2.0f)
2460 { 2460 {
2461 direc.Z *= 3.0f; 2461 if(m_animator.m_animTickJump == -1)
2462 2462 {
2463 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored. 2463 direc.Z *= 3.0f; // jump
2464 Animator.TrySetMovementAnimation("PREJUMP"); 2464 }
2465 Animator.TrySetMovementAnimation("JUMP"); 2465 else
2466 {
2467 direc.Z *= 0.1f; // prejump
2468 }
2469 /* Animations are controlled via GetMovementAnimation() in ScenePresenceAnimator.cs
2470 Animator.TrySetMovementAnimation("PREJUMP");
2471 Animator.TrySetMovementAnimation("JUMP");
2472 */
2466 } 2473 }
2467 } 2474 }
2468 } 2475 }