aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
index c53ccec..ec717d7 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
@@ -1122,9 +1122,18 @@ namespace OpenSim.Region.Physics.OdePlugin
1122 } 1122 }
1123 // end add Kitto Flora 1123 // end add Kitto Flora
1124 } 1124 }
1125
1126 if (vel.X * vel.X + vel.Y * vel.Y + vel.Z * vel.Z > 2500.0f) // 50ms apply breaks
1127 {
1128 float breakfactor = 0.16f * m_mass; // will give aprox 60m/s terminal velocity at free fall
1129 vec.X -= breakfactor * vel.X;
1130 vec.Y -= breakfactor * vel.Y;
1131 vec.Z -= breakfactor * vel.Z;
1132 }
1133
1125 if (vec.IsFinite()) 1134 if (vec.IsFinite())
1126 { 1135 {
1127 if (!vec.ApproxEquals(Vector3.Zero, 0.02f)) // 0.01 allows 0.002 !! 1136 if (vec.LengthSquared() > 0.0004f) // 0.01 allows 0.002 !!
1128 { 1137 {
1129//Console.WriteLine("DF 2"); // ## 1138//Console.WriteLine("DF 2"); // ##
1130 1139