aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2012-09-27 08:23:29 -0700
committerRobert Adams2012-09-27 22:01:52 -0700
commitf82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b (patch)
tree3d355254a7bcb8c447fbfef901784af7062763d4 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentBulletSim: Terrain sets proper collision flags on creation. (diff)
downloadopensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.zip
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.gz
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.bz2
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.xz
BulletSim: Fix linkset crash. Caused by the different body and shape
pointers at runtime and at taint-time. Now passes the body into the taint. Vehicles zero inertia when active to eliminate Bullet's contribution to vehicle motion.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index aadb8d6..72c6df5 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -498,7 +498,8 @@ public class BSShapeCollection : IDisposable
498 ulong newHullKey = ComputeShapeKey(shapeData, pbs, out lod); 498 ulong newHullKey = ComputeShapeKey(shapeData, pbs, out lod);
499 499
500 // if the hull hasn't changed, don't rebuild it 500 // if the hull hasn't changed, don't rebuild it
501 if (newHullKey == prim.BSShape.shapeKey) return false; 501 if (newHullKey == prim.BSShape.shapeKey && prim.BSShape.type == ShapeData.PhysicsShapeType.SHAPE_HULL)
502 return false;
502 503
503 DetailLog("{0},BSShapeCollection.CreateGeomHull,create,oldKey={1},newKey={2}", 504 DetailLog("{0},BSShapeCollection.CreateGeomHull,create,oldKey={1},newKey={2}",
504 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newHullKey.ToString("X")); 505 prim.LocalID, prim.BSShape.shapeKey.ToString("X"), newHullKey.ToString("X"));
@@ -508,11 +509,8 @@ public class BSShapeCollection : IDisposable
508 509
509 newShape = CreatePhysicalHull(prim.PhysObjectName, newHullKey, pbs, shapeData.Size, lod); 510 newShape = CreatePhysicalHull(prim.PhysObjectName, newHullKey, pbs, shapeData.Size, lod);
510 511
511 if (!ReferenceShape(newShape)) 512 ReferenceShape(newShape);
512 { 513
513 PhysicsScene.Logger.ErrorFormat("{0} Created new hull shape but one already exists: id={1}, key={2}, refCnt={3}",
514 LogHeader, shapeData.ID, newHullKey.ToString("X"), Hulls[newHullKey].referenceCount);
515 }
516 // hulls are already scaled by the meshmerizer 514 // hulls are already scaled by the meshmerizer
517 prim.Scale = new OMV.Vector3(1f, 1f, 1f); 515 prim.Scale = new OMV.Vector3(1f, 1f, 1f);
518 prim.BSShape = newShape; 516 prim.BSShape = newShape;