aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index 238e6e9..e912997 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -1097,8 +1097,20 @@ namespace OpenSim.Region.Physics.OdePlugin
1097 { 1097 {
1098 float h = contact.pos.Z - _position.Z; 1098 float h = contact.pos.Z - _position.Z;
1099 1099
1100 // Only do this if the normal is sufficiently pointing in the 'up' direction
1100 if (Math.Abs(contact.normal.Z) > 0.95f) 1101 if (Math.Abs(contact.normal.Z) > 0.95f)
1101 { 1102 {
1103 // We Only want to do this if we're sunk into the object a bit and we're stuck and we're trying to move and feetcollision is false
1104 if ((contact.depth > 0.0010f && _velocity.X == 0f && _velocity.Y == 0 && _velocity.Z == 0)
1105 && (_target_velocity.X > 0 || _target_velocity.Y > 0 || _target_velocity.Z > 0)
1106 && (!feetcollision) )
1107 {
1108 m_collisionException = true; // Stop looping, do this only once not X times Contacts
1109 _position.Z += contact.depth + 0.01f; // Move us Up the amount that we sank in, and add 0.01 meters to gently lift avatar up.
1110
1111 return true;
1112 }
1113
1102 if (contact.normal.Z > 0) 1114 if (contact.normal.Z > 0)
1103 contact.normal.Z = 1.0f; 1115 contact.normal.Z = 1.0f;
1104 else 1116 else