diff options
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index b9bb06e..3185aad 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | |||
@@ -990,6 +990,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
990 | // end add Kitto Flora | 990 | // end add Kitto Flora |
991 | } | 991 | } |
992 | 992 | ||
993 | if (vel.X * vel.X + vel.Y * vel.Y + vel.Z * vel.Z > 2500.0f) // 50m/s apply breaks | ||
994 | { | ||
995 | float breakfactor = 0.16f * m_mass; // will give aprox 60m/s terminal velocity at free fall | ||
996 | vec.X -= breakfactor * vel.X; | ||
997 | vec.Y -= breakfactor * vel.Y; | ||
998 | vec.Z -= breakfactor * vel.Z; | ||
999 | } | ||
1000 | |||
993 | if (vec.IsFinite()) | 1001 | if (vec.IsFinite()) |
994 | { | 1002 | { |
995 | if (vec.X != 0 || vec.Y !=0 || vec.Z !=0) | 1003 | if (vec.X != 0 || vec.Y !=0 || vec.Z !=0) |