aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index b1833c5..d9427e1 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -338,6 +338,7 @@ public class BSShapeCollection : IDisposable
338 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_AVATAR, 338 ret = GetReferenceToNativeShape(prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_AVATAR,
339 ShapeData.FixedShapeKey.KEY_CAPSULE, shapeCallback); 339 ShapeData.FixedShapeKey.KEY_CAPSULE, shapeCallback);
340 DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.BSShape); 340 DetailLog("{0},BSShapeCollection.CreateGeom,avatarCapsule,shape={1}", prim.LocalID, prim.BSShape);
341 ret = true;
341 haveShape = true; 342 haveShape = true;
342 } 343 }
343 // If the prim attributes are simple, this could be a simple Bullet native shape 344 // If the prim attributes are simple, this could be a simple Bullet native shape
@@ -411,15 +412,14 @@ public class BSShapeCollection : IDisposable
411 ShapeData.PhysicsShapeType shapeType, ShapeData.FixedShapeKey shapeKey, 412 ShapeData.PhysicsShapeType shapeType, ShapeData.FixedShapeKey shapeKey,
412 ShapeDestructionCallback shapeCallback) 413 ShapeDestructionCallback shapeCallback)
413 { 414 {
415 // release any previous shape
416 DereferenceShape(prim.BSShape, true, shapeCallback);
414 417
415 shapeData.Type = shapeType; 418 shapeData.Type = shapeType;
416 // Bullet native objects are scaled by the Bullet engine so pass the size in 419 // Bullet native objects are scaled by the Bullet engine so pass the size in
417 prim.Scale = shapeData.Size; 420 prim.Scale = shapeData.Size;
418 shapeData.Scale = shapeData.Size; 421 shapeData.Scale = shapeData.Size;
419 422
420 // release any previous shape
421 DereferenceShape(prim.BSShape, true, shapeCallback);
422
423 BulletShape newShape = BuildPhysicalNativeShape(shapeType, shapeData, shapeKey); 423 BulletShape newShape = BuildPhysicalNativeShape(shapeType, shapeData, shapeKey);
424 424
425 // Don't need to do a 'ReferenceShape()' here because native shapes are not shared. 425 // Don't need to do a 'ReferenceShape()' here because native shapes are not shared.