aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs16
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 7fce8c9..aadb8d6 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -344,7 +344,10 @@ public class BSShapeCollection : IDisposable
344 if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1) 344 if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1)
345 { 345 {
346 haveShape = true; 346 haveShape = true;
347 if (forceRebuild || (prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_SPHERE)) 347 if (forceRebuild
348 || prim.Scale != shapeData.Size
349 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_SPHERE
350 )
348 { 351 {
349 ret = GetReferenceToNativeShape(prim, shapeData, 352 ret = GetReferenceToNativeShape(prim, shapeData,
350 ShapeData.PhysicsShapeType.SHAPE_SPHERE, ShapeData.FixedShapeKey.KEY_SPHERE); 353 ShapeData.PhysicsShapeType.SHAPE_SPHERE, ShapeData.FixedShapeKey.KEY_SPHERE);
@@ -355,7 +358,10 @@ public class BSShapeCollection : IDisposable
355 else 358 else
356 { 359 {
357 haveShape = true; 360 haveShape = true;
358 if (forceRebuild || (prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_BOX)) 361 if (forceRebuild
362 || prim.Scale != shapeData.Size
363 || prim.BSShape.type != ShapeData.PhysicsShapeType.SHAPE_BOX
364 )
359 { 365 {
360 ret = GetReferenceToNativeShape( 366 ret = GetReferenceToNativeShape(
361 prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_BOX, ShapeData.FixedShapeKey.KEY_BOX); 367 prim, shapeData, ShapeData.PhysicsShapeType.SHAPE_BOX, ShapeData.FixedShapeKey.KEY_BOX);
@@ -406,7 +412,7 @@ public class BSShapeCollection : IDisposable
406 newShape.isNativeShape = true; 412 newShape.isNativeShape = true;
407 413
408 // Don't need to do a 'ReferenceShape()' here because native shapes are not tracked. 414 // Don't need to do a 'ReferenceShape()' here because native shapes are not tracked.
409 DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape); 415 // DetailLog("{0},BSShapeCollection.AddNativeShapeToPrim,create,newshape={1}", shapeData.ID, newShape);
410 416
411 prim.BSShape = newShape; 417 prim.BSShape = newShape;
412 return true; 418 return true;
@@ -683,13 +689,13 @@ public class BSShapeCollection : IDisposable
683 { 689 {
684 bodyPtr = BulletSimAPI.CreateBodyFromShape2(sim.ptr, shape.ptr, 690 bodyPtr = BulletSimAPI.CreateBodyFromShape2(sim.ptr, shape.ptr,
685 shapeData.ID, shapeData.Position, shapeData.Rotation); 691 shapeData.ID, shapeData.Position, shapeData.Rotation);
686 DetailLog("{0},BSShapeCollection.CreateBody,mesh,ptr={1}", prim.LocalID, bodyPtr.ToString("X")); 692 // DetailLog("{0},BSShapeCollection.CreateBody,mesh,ptr={1}", prim.LocalID, bodyPtr.ToString("X"));
687 } 693 }
688 else 694 else
689 { 695 {
690 bodyPtr = BulletSimAPI.CreateGhostFromShape2(sim.ptr, shape.ptr, 696 bodyPtr = BulletSimAPI.CreateGhostFromShape2(sim.ptr, shape.ptr,
691 shapeData.ID, shapeData.Position, shapeData.Rotation); 697 shapeData.ID, shapeData.Position, shapeData.Rotation);
692 DetailLog("{0},BSShapeCollection.CreateBody,ghost,ptr={1}", prim.LocalID, bodyPtr.ToString("X")); 698 // DetailLog("{0},BSShapeCollection.CreateBody,ghost,ptr={1}", prim.LocalID, bodyPtr.ToString("X"));
693 } 699 }
694 aBody = new BulletBody(shapeData.ID, bodyPtr); 700 aBody = new BulletBody(shapeData.ID, bodyPtr);
695 701