aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
index 7d855f1..49020e9 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODECharacter.cs
@@ -1108,7 +1108,24 @@ namespace OpenSim.Region.PhysicsModule.ubOde
1108 vec.Z = depth * PID_P * 50; 1108 vec.Z = depth * PID_P * 50;
1109 1109
1110 if (!flying) 1110 if (!flying)
1111 {
1111 vec.Z += -vel.Z * PID_D; 1112 vec.Z += -vel.Z * PID_D;
1113 if(n.Z < 0.4f)
1114 {
1115 vec.X = depth * PID_P * 50 - vel.X * PID_D;
1116 vec.X *= n.X;
1117 vec.Y = depth * PID_P * 50 - vel.Y * PID_D;
1118 vec.Y *= n.Y;
1119 vec.Z *= n.Z;
1120 if(n.Z < 0.1f)
1121 {
1122 // cancel the slope pose
1123 n.X = 0f;
1124 n.Y = 0f;
1125 n.Z = 1.0f;
1126 }
1127 }
1128 }
1112 1129
1113 if (depth < 0.2f) 1130 if (depth < 0.2f)
1114 { 1131 {