aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
index 1f1ba95..c53ccec 100644
--- a/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/ChOdePlugin/ODECharacter.cs
@@ -921,6 +921,8 @@ namespace OpenSim.Region.Physics.OdePlugin
921 m_haveTaintMomentum = true; 921 m_haveTaintMomentum = true;
922 _parent_scene.AddPhysicsActorTaint(this); 922 _parent_scene.AddPhysicsActorTaint(this);
923 } 923 }
924 else
925 m_log.Warn("[PHYSICS] !isFinite momentum");
924 } 926 }
925 927
926 928
@@ -1337,7 +1339,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1337 { 1339 {
1338 lock (m_syncRoot) 1340 lock (m_syncRoot)
1339 { 1341 {
1340
1341 if (m_tainted_isPhysical != m_isPhysical) 1342 if (m_tainted_isPhysical != m_isPhysical)
1342 { 1343 {
1343 if (m_tainted_isPhysical) 1344 if (m_tainted_isPhysical)
@@ -1379,9 +1380,9 @@ namespace OpenSim.Region.Physics.OdePlugin
1379 { 1380 {
1380 d.GeomDestroy(Shell); 1381 d.GeomDestroy(Shell);
1381 } 1382 }
1382 catch (System.AccessViolationException) 1383 catch (Exception e)
1383 { 1384 {
1384 m_log.Error("[PHYSICS]: PrimGeom dead"); 1385 m_log.ErrorFormat("[PHYSICS]: Failed to destroy character shell {0}",e.Message);
1385 } 1386 }
1386 // Remove any old entries 1387 // Remove any old entries
1387 //string tShell; 1388 //string tShell;
@@ -1428,10 +1429,10 @@ namespace OpenSim.Region.Physics.OdePlugin
1428 { 1429 {
1429 d.BodySetPosition(Body, m_taintPosition.X, m_taintPosition.Y, m_taintPosition.Z); 1430 d.BodySetPosition(Body, m_taintPosition.X, m_taintPosition.Y, m_taintPosition.Z);
1430 1431
1431 _position.X = m_taintPosition.X;
1432 _position.Y = m_taintPosition.Y;
1433 _position.Z = m_taintPosition.Z;
1434 } 1432 }
1433 _position.X = m_taintPosition.X;
1434 _position.Y = m_taintPosition.Y;
1435 _position.Z = m_taintPosition.Z;
1435 } 1436 }
1436 1437
1437 if (m_haveTaintMomentum) 1438 if (m_haveTaintMomentum)
@@ -1440,7 +1441,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1440 _velocity = m_taintMomentum; 1441 _velocity = m_taintMomentum;
1441 _target_velocity = m_taintMomentum; 1442 _target_velocity = m_taintMomentum;
1442 m_pidControllerActive = true; 1443 m_pidControllerActive = true;
1443 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z); 1444 if (Body != IntPtr.Zero)
1445 d.BodySetLinearVel(Body, _velocity.X, _velocity.Y, _velocity.Z);
1444 } 1446 }
1445 } 1447 }
1446 } 1448 }