aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
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 31ca2ab..702a1e2 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 2197ced..122ed02 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -727,7 +727,7 @@ namespace OpenSim.Region.Framework.Scenes
727 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 727 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
728 // TODO: Change default to true once the feature is supported 728 // TODO: Change default to true once the feature is supported
729 m_usePreJump = startupConfig.GetBoolean("enableprejump", false); 729 m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
730 730 m_usePreJump = true; // Above line fails!?
731 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 731 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
732 if (RegionInfo.NonphysPrimMax > 0) 732 if (RegionInfo.NonphysPrimMax > 0)
733 { 733 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index cb24784..d76f029 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -678,7 +678,7 @@ namespace OpenSim.Region.Framework.Scenes
678 CreateSceneViewer(); 678 CreateSceneViewer();
679 m_animator = new ScenePresenceAnimator(this); 679 m_animator = new ScenePresenceAnimator(this);
680 } 680 }
681 681
682 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() 682 private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this()
683 { 683 {
684 m_rootRegionHandle = reginfo.RegionHandle; 684 m_rootRegionHandle = reginfo.RegionHandle;
@@ -1468,7 +1468,6 @@ namespace OpenSim.Region.Framework.Scenes
1468 } 1468 }
1469 i++; 1469 i++;
1470 } 1470 }
1471
1472 //Paupaw:Do Proper PID for Autopilot here 1471 //Paupaw:Do Proper PID for Autopilot here
1473 if (bResetMoveToPosition) 1472 if (bResetMoveToPosition)
1474 { 1473 {
@@ -2447,10 +2446,11 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2447 Rotation = rotation; 2446 Rotation = rotation;
2448 Vector3 direc = vec * rotation; 2447 Vector3 direc = vec * rotation;
2449 direc.Normalize(); 2448 direc.Normalize();
2449 PhysicsActor actor = m_physicsActor;
2450 if ((vec.Z == 0f) && !actor.Flying) direc.Z = 0f; // Prevent camera WASD up.
2450 2451
2451 direc *= 0.03f * 128f * m_speedModifier; 2452 direc *= 0.03f * 128f * m_speedModifier;
2452 2453
2453 PhysicsActor actor = m_physicsActor;
2454 if (actor != null) 2454 if (actor != null)
2455 { 2455 {
2456 if (actor.Flying) 2456 if (actor.Flying)
@@ -2472,11 +2472,18 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos);
2472 { 2472 {
2473 if (direc.Z > 2.0f) 2473 if (direc.Z > 2.0f)
2474 { 2474 {
2475 direc.Z *= 3.0f; 2475 if(m_animator.m_animTickJump == -1)
2476 2476 {
2477 // TODO: PreJump and jump happen too quickly. Many times prejump gets ignored. 2477 direc.Z *= 3.0f; // jump
2478 Animator.TrySetMovementAnimation("PREJUMP"); 2478 }
2479 Animator.TrySetMovementAnimation("JUMP"); 2479 else
2480 {
2481 direc.Z *= 0.1f; // prejump
2482 }
2483 /* Animations are controlled via GetMovementAnimation() in ScenePresenceAnimator.cs
2484 Animator.TrySetMovementAnimation("PREJUMP");
2485 Animator.TrySetMovementAnimation("JUMP");
2486 */
2480 } 2487 }
2481 } 2488 }
2482 } 2489 }