diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
1 files changed, 15 insertions, 8 deletions
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 | } |