aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 98b69b1..e0f6ed2 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -224,10 +224,12 @@ public sealed class BSPrim : PhysicsActor
224 // link me to the specified parent 224 // link me to the specified parent
225 public override void link(PhysicsActor obj) { 225 public override void link(PhysicsActor obj) {
226 BSPrim parent = obj as BSPrim; 226 BSPrim parent = obj as BSPrim;
227 DebugLog("{0}: link {1}/{2} to {3}", LogHeader, _avName, _localID, obj.LocalID); 227 if (parent != null)
228 DetailLog("{0},link,parent={1}", LocalID, obj.LocalID); 228 {
229 229 DebugLog("{0}: link {1}/{2} to {3}", LogHeader, _avName, _localID, parent.LocalID);
230 _linkset = _linkset.AddMeToLinkset(this, parent); 230 DetailLog("{0},link,parent={1}", LocalID, parent.LocalID);
231 _linkset = _linkset.AddMeToLinkset(this, parent);
232 }
231 return; 233 return;
232 } 234 }
233 235
@@ -478,7 +480,6 @@ public sealed class BSPrim : PhysicsActor
478 480
479 // Make gravity work if the object is physical and not selected 481 // Make gravity work if the object is physical and not selected
480 // No locking here because only called when it is safe 482 // No locking here because only called when it is safe
481 // Only called at taint time so it is save to call into Bullet.
482 private void SetObjectDynamic() 483 private void SetObjectDynamic()
483 { 484 {
484 // RA: remove this for the moment. 485 // RA: remove this for the moment.
@@ -982,7 +983,7 @@ public sealed class BSPrim : PhysicsActor
982 // m_log.DebugFormat("{0}: CreateGeom: Defaulting to sphere of size {1}", LogHeader, _size); 983 // m_log.DebugFormat("{0}: CreateGeom: Defaulting to sphere of size {1}", LogHeader, _size);
983 if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_SPHERE)) 984 if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_SPHERE))
984 { 985 {
985 DetailLog("{0},CreateGeom,sphere", LocalID); 986 DetailLog("{0},CreateGeom,sphere (force={1}", LocalID, forceRebuild);
986 _shapeType = ShapeData.PhysicsShapeType.SHAPE_SPHERE; 987 _shapeType = ShapeData.PhysicsShapeType.SHAPE_SPHERE;
987 // Bullet native objects are scaled by the Bullet engine so pass the size in 988 // Bullet native objects are scaled by the Bullet engine so pass the size in
988 _scale = _size; 989 _scale = _size;
@@ -996,7 +997,7 @@ public sealed class BSPrim : PhysicsActor
996 // m_log.DebugFormat("{0}: CreateGeom: Defaulting to box. lid={1}, type={2}, size={3}", LogHeader, LocalID, _shapeType, _size); 997 // m_log.DebugFormat("{0}: CreateGeom: Defaulting to box. lid={1}, type={2}, size={3}", LogHeader, LocalID, _shapeType, _size);
997 if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_BOX)) 998 if (forceRebuild || (_shapeType != ShapeData.PhysicsShapeType.SHAPE_BOX))
998 { 999 {
999 DetailLog("{0},CreateGeom,box", LocalID); 1000 DetailLog("{0},CreateGeom,box (force={1})", LocalID, forceRebuild);
1000 _shapeType = ShapeData.PhysicsShapeType.SHAPE_BOX; 1001 _shapeType = ShapeData.PhysicsShapeType.SHAPE_BOX;
1001 _scale = _size; 1002 _scale = _size;
1002 // TODO: do we need to check for and destroy a mesh or hull that might have been left from before? 1003 // TODO: do we need to check for and destroy a mesh or hull that might have been left from before?