diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs index b9bb06ec58..3185aad7e4 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs @@ -990,6 +990,14 @@ namespace OpenSim.Region.Physics.OdePlugin // end add Kitto Flora } + if (vel.X * vel.X + vel.Y * vel.Y + vel.Z * vel.Z > 2500.0f) // 50m/s apply breaks + { + float breakfactor = 0.16f * m_mass; // will give aprox 60m/s terminal velocity at free fall + vec.X -= breakfactor * vel.X; + vec.Y -= breakfactor * vel.Y; + vec.Z -= breakfactor * vel.Z; + } + if (vec.IsFinite()) { if (vec.X != 0 || vec.Y !=0 || vec.Z !=0) diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs index e66580de5d..5122ebfa11 100644 --- a/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs +++ b/OpenSim/Region/Physics/UbitOdePlugin/ODERayCastRequestManager.cs @@ -94,7 +94,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.length = length; req.Normal = direction; req.Origin = position; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -115,7 +115,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = DefaultMaxCount; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -129,7 +129,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.length = length; req.Normal = direction; req.Origin = position; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -143,7 +143,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = DefaultMaxCount; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -165,7 +165,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -194,7 +194,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -208,7 +208,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); } @@ -222,7 +222,7 @@ namespace OpenSim.Region.Physics.OdePlugin req.Normal = direction; req.Origin = position; req.Count = count; - req.filter = RayFilterFlags.AllButLand; + req.filter = RayFilterFlags.AllPrims; m_PendingRequests.Enqueue(req); }