aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
index 3df2ddc..862b744 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSConstraintCollection.cs
@@ -112,16 +112,24 @@ public class BSConstraintCollection : IDisposable
112 { 112 {
113 m_world.scene.DetailLog("{0},BSConstraintCollection.RemoveAndDestroyConstraint,taint,body1={1},body2={2}", BSScene.DetailLogZero, body1.ID, body2.ID); 113 m_world.scene.DetailLog("{0},BSConstraintCollection.RemoveAndDestroyConstraint,taint,body1={1},body2={2}", BSScene.DetailLogZero, body1.ID, body2.ID);
114 // remove the constraint from our collection 114 // remove the constraint from our collection
115 m_constraints.Remove(constrain); 115 RemoveAndDestroyConstraint(constrain);
116 // tell the engine that all its structures need to be freed
117 constrain.Dispose();
118 // we destroyed something
119 ret = true; 116 ret = true;
120 } 117 }
121 118
122 return ret; 119 return ret;
123 } 120 }
124 121
122 // The constraint MUST exist in the collection
123 public bool RemoveAndDestroyConstraint(BSConstraint constrain)
124 {
125 // remove the constraint from our collection
126 m_constraints.Remove(constrain);
127 // tell the engine that all its structures need to be freed
128 constrain.Dispose();
129 // we destroyed something
130 return true;
131 }
132
125 // Remove all constraints that reference the passed body. 133 // Remove all constraints that reference the passed body.
126 // Return 'true' if any constraints were destroyed. 134 // Return 'true' if any constraints were destroyed.
127 public bool RemoveAndDestroyConstraint(BulletBody body1) 135 public bool RemoveAndDestroyConstraint(BulletBody body1)