aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs29
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs13
2 files changed, 38 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index c7e0848..b0e9a91 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -2185,9 +2185,30 @@ Console.WriteLine(" JointCreateFixed");
2185 if (IsPhysical) 2185 if (IsPhysical)
2186 { 2186 {
2187 Vector3 iforce = Vector3.Zero; 2187 Vector3 iforce = Vector3.Zero;
2188 for (int i = 0; i < m_forcelist.Count; i++) 2188 int i = 0;
2189 try
2190 {
2191 for (i = 0; i < m_forcelist.Count; i++)
2192 {
2193
2194 iforce = iforce + (m_forcelist[i] * 100);
2195 }
2196 }
2197 catch (IndexOutOfRangeException)
2198 {
2199 m_forcelist = new List<Vector3>();
2200 m_collisionscore = 0;
2201 m_interpenetrationcount = 0;
2202 m_taintforce = false;
2203 return;
2204 }
2205 catch (ArgumentOutOfRangeException)
2189 { 2206 {
2190 iforce = iforce + (m_forcelist[i] * 100); 2207 m_forcelist = new List<Vector3>();
2208 m_collisionscore = 0;
2209 m_interpenetrationcount = 0;
2210 m_taintforce = false;
2211 return;
2191 } 2212 }
2192 d.BodyEnable(Body); 2213 d.BodyEnable(Body);
2193 d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z); 2214 d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z);
@@ -2521,7 +2542,9 @@ Console.WriteLine(" JointCreateFixed");
2521 { 2542 {
2522 if (force.IsFinite()) 2543 if (force.IsFinite())
2523 { 2544 {
2524 m_forcelist.Add(force); 2545 lock (m_forcelist)
2546 m_forcelist.Add(force);
2547
2525 m_taintforce = true; 2548 m_taintforce = true;
2526 } 2549 }
2527 else 2550 else
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 981cf43..e6b31ca 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -835,7 +835,18 @@ namespace OpenSim.Region.Physics.OdePlugin
835 // allows us to have different settings 835 // allows us to have different settings
836 836
837 // We only need to test p2 for 'jump crouch purposes' 837 // We only need to test p2 for 'jump crouch purposes'
838 p2.IsColliding = true; 838 if (p2 is OdeCharacter)
839 {
840 // Testing if the collision is at the feet of the avatar
841
842 //m_log.DebugFormat("[PHYSICS]: {0} - {1} - {2} - {3}", curContact.pos.Z, p2.Position.Z, (p2.Position.Z - curContact.pos.Z), (p2.Size.Z * 0.6f));
843 if ((p2.Position.Z - curContact.pos.Z) > (p2.Size.Z * 0.6f))
844 p2.IsColliding = true;
845 }
846 else
847 {
848 p2.IsColliding = true;
849 }
839 850
840 //if ((framecount % m_returncollisions) == 0) 851 //if ((framecount % m_returncollisions) == 0)
841 852