diff options
author | Robert Adams | 2012-10-23 08:02:26 -0700 |
---|---|---|
committer | Robert Adams | 2012-10-23 08:02:26 -0700 |
commit | b49f8a377b9ac542096a0bc8ad30b11942c27413 (patch) | |
tree | 36a4d9d9e25a374860be1670619cfb5ffa798189 /OpenSim/Region/Physics | |
parent | BulletSim: remove chatty debug message. (diff) | |
download | opensim-SC-b49f8a377b9ac542096a0bc8ad30b11942c27413.zip opensim-SC-b49f8a377b9ac542096a0bc8ad30b11942c27413.tar.gz opensim-SC-b49f8a377b9ac542096a0bc8ad30b11942c27413.tar.bz2 opensim-SC-b49f8a377b9ac542096a0bc8ad30b11942c27413.tar.xz |
BulletSim: minor change to insure avatar body recreation when shape changes.
Diffstat (limited to 'OpenSim/Region/Physics')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 6 |
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. |