aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 0b81122..54bf063 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -146,9 +146,9 @@ public sealed class BSPrim : BSPhysObject
146 { 146 {
147 DetailLog("{0},BSPrim.Destroy,taint,", LocalID); 147 DetailLog("{0},BSPrim.Destroy,taint,", LocalID);
148 // If there are physical body and shape, release my use of same. 148 // If there are physical body and shape, release my use of same.
149 PhysicsScene.Shapes.DereferenceBody(PhysBody, true, null); 149 PhysicsScene.Shapes.DereferenceBody(PhysBody, null);
150 PhysBody.Clear(); 150 PhysBody.Clear();
151 PhysicsScene.Shapes.DereferenceShape(PhysShape, true, null); 151 PhysicsScene.Shapes.DereferenceShape(PhysShape, null);
152 PhysShape.Clear(); 152 PhysShape.Clear();
153 }); 153 });
154 } 154 }
@@ -181,11 +181,19 @@ public sealed class BSPrim : BSPhysObject
181 181
182 public override bool ForceBodyShapeRebuild(bool inTaintTime) 182 public override bool ForceBodyShapeRebuild(bool inTaintTime)
183 { 183 {
184 PhysicsScene.TaintedObject(inTaintTime, "BSPrim.ForceBodyShapeRebuild", delegate() 184 if (inTaintTime)
185 { 185 {
186 _mass = CalculateMass(); // changing the shape changes the mass 186 _mass = CalculateMass(); // changing the shape changes the mass
187 CreateGeomAndObject(true); 187 CreateGeomAndObject(true);
188 }); 188 }
189 else
190 {
191 PhysicsScene.TaintedObject("BSPrim.ForceBodyShapeRebuild", delegate()
192 {
193 _mass = CalculateMass(); // changing the shape changes the mass
194 CreateGeomAndObject(true);
195 });
196 }
189 return true; 197 return true;
190 } 198 }
191 public override bool Grabbed { 199 public override bool Grabbed {