From 0ac161c9a89075b414941d00b34b50e16c023a51 Mon Sep 17 00:00:00 2001
From: UbitUmarov
Date: Mon, 9 Jul 2012 16:51:56 +0100
Subject:  log ODE lib configuration

---
 OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 5920838..46251de 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -175,7 +175,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 
         const d.ContactFlags comumContactFlags = d.ContactFlags.SoftERP | d.ContactFlags.SoftCFM |d.ContactFlags.Approx1 | d.ContactFlags.Bounce;
         const float MaxERP = 0.8f;
-        const float minERP = 0.1f;
+        const float minERP = 0.2f;
         const float comumContactCFM = 0.0001f;
         
         float frictionMovementMult = 0.8f;
@@ -408,7 +408,7 @@ namespace OpenSim.Region.Physics.OdePlugin
 //            checkThread();
             mesher = meshmerizer;
             m_config = config;
-/*
+
             string ode_config = d.GetConfiguration("ODE");
             if (ode_config != null && ode_config != "")
             {
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Physics.OdePlugin
                     OdeUbitLib = true;
                 }
             }
-*/
+
             /*
                         if (region != null)
                         {
@@ -921,6 +921,8 @@ namespace OpenSim.Region.Physics.OdePlugin
                             cfm = 0.0001f / cfm;
                             if (cfm > 0.01f)
                                 cfm = 0.01f;
+                            else if (cfm < 0.0001f)
+                                cfm = 0.0001f;
 
                             if ((Math.Abs(p2.Velocity.X - p1.Velocity.X) > 0.1f || Math.Abs(p2.Velocity.Y - p1.Velocity.Y) > 0.1f))
                                 mu *= frictionMovementMult;
@@ -947,6 +949,8 @@ namespace OpenSim.Region.Physics.OdePlugin
                                     cfm = 0.0001f / cfm;
                                     if (cfm > 0.01f)
                                         cfm = 0.01f;
+                                    else if (cfm < 0.0001f)
+                                        cfm = 0.0001f;
 
                                     if (d.GeomGetClass(g1) == d.GeomClassID.TriMeshClass)
                                     {
-- 
cgit v1.1