aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs23
1 files changed, 5 insertions, 18 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 319f6ab..2fac33f 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -895,30 +895,17 @@ namespace OpenSim.Region.Physics.OdePlugin
895 // We're colliding with something and we're not flying but we're moving 895 // We're colliding with something and we're not flying but we're moving
896 // This means we're walking or running. 896 // This means we're walking or running.
897 d.Vector3 pos = d.BodyGetPosition(Body); 897 d.Vector3 pos = d.BodyGetPosition(Body);
898 vec.Z = (_target_velocity.Z - vel.Z)*PID_D + (_zeroPosition.Z - pos.Z)*PID_P; 898 vec.Z = (_target_velocity.Z - vel.Z) * PID_D + (_zeroPosition.Z - pos.Z) * PID_P;
899 if (_target_velocity.X > 0) 899 vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D;
900 { 900 vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D;
901 vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D;
902 }
903 if (_target_velocity.Y > 0)
904 {
905 vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D;
906 }
907 } 901 }
908 else if (!m_iscolliding && !flying) 902 else if (!m_iscolliding && !flying)
909 { 903 {
910 // we're not colliding and we're not flying so that means we're falling! 904 // we're not colliding and we're not flying so that means we're falling!
911 // m_iscolliding includes collisions with the ground. 905 // m_iscolliding includes collisions with the ground.
912 906
913 // d.Vector3 pos = d.BodyGetPosition(Body); 907 vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D;
914 if (_target_velocity.X > 0) 908 vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D;
915 {
916 vec.X = ((_target_velocity.X - vel.X) / 1.2f) * PID_D;
917 }
918 if (_target_velocity.Y > 0)
919 {
920 vec.Y = ((_target_velocity.Y - vel.Y) / 1.2f) * PID_D;
921 }
922 } 909 }
923 910
924 if (flying) 911 if (flying)