diff options
author | Robert Adams | 2012-12-10 15:35:53 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-10 15:35:53 -0800 |
commit | 9df85eadf4b3719a898fda8769313ae023962c25 (patch) | |
tree | af055fb53368d75c236959bfde56d43f23e6f741 /OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs | |
parent | BulletSim: some comments about rebuilding linksets (having to recompute and r... (diff) | |
download | opensim-SC-9df85eadf4b3719a898fda8769313ae023962c25.zip opensim-SC-9df85eadf4b3719a898fda8769313ae023962c25.tar.gz opensim-SC-9df85eadf4b3719a898fda8769313ae023962c25.tar.bz2 opensim-SC-9df85eadf4b3719a898fda8769313ae023962c25.tar.xz |
BulletSim: Fix crash on the destruction of physical linksets.
While fixing the above, add methods to physical body and shape pointer
wrapper so routines won't have to know that IntPtr.Zero means no
physical instance.
Fix problem with physical linksets failing after a few sits and
unsits by properly restoring child prom positions for compound
linksets after multiple selection and deselections.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs index 23ef052..b073555 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraint6Dof.cs | |||
@@ -65,7 +65,7 @@ public sealed class BSConstraint6Dof : BSConstraint | |||
65 | m_world = world; | 65 | m_world = world; |
66 | m_body1 = obj1; | 66 | m_body1 = obj1; |
67 | m_body2 = obj2; | 67 | m_body2 = obj2; |
68 | if (obj1.ptr == IntPtr.Zero || obj2.ptr == IntPtr.Zero) | 68 | if (!obj1.HasPhysicalBody || !obj2.HasPhysicalBody) |
69 | { | 69 | { |
70 | world.physicsScene.DetailLog("{0},BS6DOFConstraint,badBodyPtr,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}", | 70 | world.physicsScene.DetailLog("{0},BS6DOFConstraint,badBodyPtr,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}", |
71 | BSScene.DetailLogZero, world.worldID, | 71 | BSScene.DetailLogZero, world.worldID, |
@@ -83,7 +83,7 @@ public sealed class BSConstraint6Dof : BSConstraint | |||
83 | world.physicsScene.DetailLog("{0},BS6DofConstraint,createMidPoint,wID={1}, csrt={2}, rID={3}, rBody={4}, cID={5}, cBody={6}", | 83 | world.physicsScene.DetailLog("{0},BS6DofConstraint,createMidPoint,wID={1}, csrt={2}, rID={3}, rBody={4}, cID={5}, cBody={6}", |
84 | BSScene.DetailLogZero, world.worldID, m_constraint.ptr.ToString("X"), | 84 | BSScene.DetailLogZero, world.worldID, m_constraint.ptr.ToString("X"), |
85 | obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X")); | 85 | obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X")); |
86 | if (m_constraint.ptr == IntPtr.Zero) | 86 | if (!m_constraint.HasPhysicalConstraint) |
87 | { | 87 | { |
88 | world.physicsScene.Logger.ErrorFormat("{0} Failed creation of 6Dof constraint. rootID={1}, childID={2}", | 88 | world.physicsScene.Logger.ErrorFormat("{0} Failed creation of 6Dof constraint. rootID={1}, childID={2}", |
89 | LogHeader, obj1.ID, obj2.ID); | 89 | LogHeader, obj1.ID, obj2.ID); |