aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
diff options
context:
space:
mode:
authorRobert Adams2012-10-05 15:33:17 -0700
committerRobert Adams2012-10-11 14:01:03 -0700
commit87825b0abee76c28dcffdaa2c532779b813b6d14 (patch)
tree1028e20a0c2cd8ddea9a60b0b013fa1db69daa74 /OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
parentUpdated Robust.HG.ini.example. Thanks Austin Tate. (diff)
downloadopensim-SC_OLD-87825b0abee76c28dcffdaa2c532779b813b6d14.zip
opensim-SC_OLD-87825b0abee76c28dcffdaa2c532779b813b6d14.tar.gz
opensim-SC_OLD-87825b0abee76c28dcffdaa2c532779b813b6d14.tar.bz2
opensim-SC_OLD-87825b0abee76c28dcffdaa2c532779b813b6d14.tar.xz
BulletSim: Fix crash when linking large physical linksets.
Properly remove and restore linkage constraints when upgrading a prim's mesh to a hull. Lots more debug logging. Definitions and use of Bullet structure dumping. Centralize detail logging so a Flush() can be added for debugging.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
index 63a4127..a20be3a 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint.cs
@@ -49,9 +49,16 @@ public abstract class BSConstraint : IDisposable
49 if (m_enabled) 49 if (m_enabled)
50 { 50 {
51 m_enabled = false; 51 m_enabled = false;
52 bool success = BulletSimAPI.DestroyConstraint2(m_world.ptr, m_constraint.ptr); 52 if (m_constraint.ptr != IntPtr.Zero)
53 m_world.physicsScene.DetailLog("{0},BSConstraint.Dispose,taint,body1={1},body2={2},success={3}", BSScene.DetailLogZero, m_body1.ID, m_body2.ID, success); 53 {
54 m_constraint.ptr = System.IntPtr.Zero; 54 bool success = BulletSimAPI.DestroyConstraint2(m_world.ptr, m_constraint.ptr);
55 m_world.physicsScene.DetailLog("{0},BSConstraint.Dispose,taint,id1={1},body1={2},id2={3},body2={4},success={5}",
56 BSScene.DetailLogZero,
57 m_body1.ID, m_body1.ptr.ToString("X"),
58 m_body2.ID, m_body2.ptr.ToString("X"),
59 success);
60 m_constraint.ptr = System.IntPtr.Zero;
61 }
55 } 62 }
56 } 63 }
57 64