aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index a86bf8a..399a133 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -108,7 +108,8 @@ public class BSShapeCollection : IDisposable
108 // If we had to select a new shape geometry for the object, 108 // If we had to select a new shape geometry for the object,
109 // rebuild the body around it. 109 // rebuild the body around it.
110 // Updates prim.BSBody with information/pointers to requested body 110 // Updates prim.BSBody with information/pointers to requested body
111 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World, prim.BSShape, shapeData, bodyCallback); 111 bool newBody = CreateBody((newGeom || forceRebuild), prim, PhysicsScene.World,
112 prim.BSShape, shapeData, bodyCallback);
112 ret = newGeom || newBody; 113 ret = newGeom || newBody;
113 } 114 }
114 DetailLog("{0},BSShapeCollection.GetBodyAndShape,force={1},ret={2},body={3},shape={4}", 115 DetailLog("{0},BSShapeCollection.GetBodyAndShape,force={1},ret={2},body={3},shape={4}",
@@ -140,7 +141,7 @@ public class BSShapeCollection : IDisposable
140 bodyDesc.lastReferenced = System.DateTime.Now; 141 bodyDesc.lastReferenced = System.DateTime.Now;
141 Bodies[body.ID] = bodyDesc; 142 Bodies[body.ID] = bodyDesc;
142 } 143 }
143} 144 }
144 145
145 // Release the usage of a body. 146 // Release the usage of a body.
146 // Called when releasing use of a BSBody. BSShape is handled separately. 147 // Called when releasing use of a BSBody. BSShape is handled separately.
@@ -167,7 +168,7 @@ public class BSShapeCollection : IDisposable
167 { 168 {
168 DetailLog("{0},BSShapeCollection.DereferenceBody,DestroyingBody. ptr={1}", 169 DetailLog("{0},BSShapeCollection.DereferenceBody,DestroyingBody. ptr={1}",
169 body.ID, body.ptr.ToString("X")); 170 body.ID, body.ptr.ToString("X"));
170 // If the caller needs to know, pass the event up. 171 // If the caller needs to know the old body is going away, pass the event up.
171 if (bodyCallback != null) bodyCallback(body); 172 if (bodyCallback != null) bodyCallback(body);
172 173
173 // Zero any reference to the shape so it is not freed when the body is deleted. 174 // Zero any reference to the shape so it is not freed when the body is deleted.
@@ -448,7 +449,8 @@ public class BSShapeCollection : IDisposable
448 ulong newMeshKey = ComputeShapeKey(shapeData, pbs, out lod); 449 ulong newMeshKey = ComputeShapeKey(shapeData, pbs, out lod);
449 450
450 // if this new shape is the same as last time, don't recreate the mesh 451 // if this new shape is the same as last time, don't recreate the mesh
451 if (prim.BSShape.shapeKey == newMeshKey) return false; 452 if (newMeshKey == prim.BSShape.shapeKey && prim.BSShape.type == ShapeData.PhysicsShapeType.SHAPE_MESH)
453 return false;
452 454
453 DetailLog("{0},BSShapeCollection.CreateGeomMesh,create,oldKey={1},newKey={2}", 455 DetailLog("{0},BSShapeCollection.CreateGeomMesh,create,oldKey={1},newKey={2}",
454 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newMeshKey.ToString("X")); 456 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newMeshKey.ToString("X"));