diff options
author | Charles Krinke | 2007-10-31 04:18:34 +0000 |
---|---|---|
committer | Charles Krinke | 2007-10-31 04:18:34 +0000 |
commit | 33d6222e8dc40331e98c3549a040d3d206eed338 (patch) | |
tree | d5481827758cdfc7a9f44faf016706ed75bd9ca4 /OpenSim/Region/Environment/Scenes | |
parent | set svn:eol-style (diff) | |
download | opensim-SC-33d6222e8dc40331e98c3549a040d3d206eed338.zip opensim-SC-33d6222e8dc40331e98c3549a040d3d206eed338.tar.gz opensim-SC-33d6222e8dc40331e98c3549a040d3d206eed338.tar.bz2 opensim-SC-33d6222e8dc40331e98c3549a040d3d206eed338.tar.xz |
Thank you Teravus, very much, for a 'jump', 'crouch' and 'inertia' patch for all three physics plugins.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 3b73893..b9c723b 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -613,12 +613,27 @@ namespace OpenSim.Region.Environment.Scenes | |||
613 | } | 613 | } |
614 | else | 614 | else |
615 | { | 615 | { |
616 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | 616 | if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding) |
617 | { | ||
618 | SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1); | ||
619 | } | ||
620 | else | ||
621 | { | ||
622 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | ||
623 | } | ||
624 | |||
617 | } | 625 | } |
618 | } | 626 | } |
619 | else | 627 | else |
620 | { | 628 | { |
621 | SendAnimPack(Animations.AnimsLLUUID["STAND"], 1); | 629 | if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding) |
630 | { | ||
631 | SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1); | ||
632 | } | ||
633 | else | ||
634 | { | ||
635 | SendAnimPack(Animations.AnimsLLUUID["STAND"], 1); | ||
636 | } | ||
622 | } | 637 | } |
623 | } | 638 | } |
624 | } | 639 | } |
@@ -638,7 +653,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
638 | 653 | ||
639 | direc = direc*((0.03f)*128f); | 654 | direc = direc*((0.03f)*128f); |
640 | if (m_physicsActor.Flying) | 655 | if (m_physicsActor.Flying) |
641 | direc *= 4; | 656 | { direc *= 4; } |
657 | else | ||
658 | { | ||
659 | if (!m_physicsActor.Flying && m_physicsActor.IsColliding) | ||
660 | { | ||
661 | //direc.z *= 40; | ||
662 | if (direc.z > 2.0f) | ||
663 | { | ||
664 | direc.z *= 3; | ||
665 | //System.Console.WriteLine("Jump"); | ||
666 | SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1); | ||
667 | } | ||
668 | |||
669 | } | ||
670 | } | ||
642 | 671 | ||
643 | newVelocity.X = direc.x; | 672 | newVelocity.X = direc.x; |
644 | newVelocity.Y = direc.y; | 673 | newVelocity.Y = direc.y; |
@@ -867,7 +896,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
867 | 896 | ||
868 | protected void CheckForSignificantMovement() | 897 | protected void CheckForSignificantMovement() |
869 | { | 898 | { |
870 | if (AbsolutePosition.GetDistanceTo(posLastSignificantMove) > 2.0) | 899 | if (AbsolutePosition.GetDistanceTo(posLastSignificantMove) > 0.02) |
871 | { | 900 | { |
872 | posLastSignificantMove = AbsolutePosition; | 901 | posLastSignificantMove = AbsolutePosition; |
873 | if (OnSignificantClientMovement != null) | 902 | if (OnSignificantClientMovement != null) |
@@ -982,6 +1011,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
982 | NewForce force = m_forcesList[i]; | 1011 | NewForce force = m_forcesList[i]; |
983 | 1012 | ||
984 | m_updateflag = true; | 1013 | m_updateflag = true; |
1014 | |||
1015 | |||
985 | Velocity = new LLVector3(force.X, force.Y, force.Z); | 1016 | Velocity = new LLVector3(force.X, force.Y, force.Z); |
986 | m_newForce = true; | 1017 | m_newForce = true; |
987 | } | 1018 | } |