aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs16
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 20eb871..1f16cc8 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -246,7 +246,8 @@ public sealed class BSLinksetCompound : BSLinkset
246 } 246 }
247 247
248 // Routine called when rebuilding the body of some member of the linkset. 248 // Routine called when rebuilding the body of some member of the linkset.
249 // Since we don't keep in world relationships, do nothing unless it's a child changing. 249 // If one of the bodies is being changed, the linkset needs rebuilding.
250 // For instance, a linkset is built and then a mesh asset is read in and the mesh is recreated.
250 // Returns 'true' of something was actually removed and would need restoring 251 // Returns 'true' of something was actually removed and would need restoring
251 // Called at taint-time!! 252 // Called at taint-time!!
252 public override bool RemoveDependencies(BSPrimLinkable child) 253 public override bool RemoveDependencies(BSPrimLinkable child)
@@ -256,14 +257,7 @@ public sealed class BSLinksetCompound : BSLinkset
256 DetailLog("{0},BSLinksetCompound.RemoveBodyDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}", 257 DetailLog("{0},BSLinksetCompound.RemoveBodyDependencies,refreshIfChild,rID={1},rBody={2},isRoot={3}",
257 child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody, IsRoot(child)); 258 child.LocalID, LinksetRoot.LocalID, LinksetRoot.PhysBody, IsRoot(child));
258 259
259 if (!IsRoot(child)) 260 ScheduleRebuild(child);
260 {
261 child.LinksetInfo = null;
262 }
263
264 // Cannot schedule a refresh/rebuild here because this routine is called when
265 // the linkset is being rebuilt.
266 // InternalRefresh(LinksetRoot);
267 261
268 return ret; 262 return ret;
269 } 263 }
@@ -322,7 +316,7 @@ public sealed class BSLinksetCompound : BSLinkset
322 // Constraint linksets are rebuilt every time. 316 // Constraint linksets are rebuilt every time.
323 // Note that this works for rebuilding just the root after a linkset is taken apart. 317 // Note that this works for rebuilding just the root after a linkset is taken apart.
324 // Called at taint time!! 318 // Called at taint time!!
325 private bool UseBulletSimRootOffsetHack = false; 319 private bool UseBulletSimRootOffsetHack = false; // Attempt to have Bullet track the coords of root compound shape
326 private bool disableCOM = true; // For basic linkset debugging, turn off the center-of-mass setting 320 private bool disableCOM = true; // For basic linkset debugging, turn off the center-of-mass setting
327 private void RecomputeLinksetCompound() 321 private void RecomputeLinksetCompound()
328 { 322 {
@@ -382,7 +376,7 @@ public sealed class BSLinksetCompound : BSLinkset
382 OMV.Quaternion offsetRot = cPrim.RawOrientation * invRootOrientation; 376 OMV.Quaternion offsetRot = cPrim.RawOrientation * invRootOrientation;
383 m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot); 377 m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot);
384 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}", 378 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}",
385 LinksetRoot.LocalID, memberIndex, cPrim.PhysShape, offsetPos, offsetRot); 379 LinksetRoot.LocalID, memberIndex, childShape, offsetPos, offsetRot);
386 380
387 // Since we are borrowing the shape of the child, disable the origional child body 381 // Since we are borrowing the shape of the child, disable the origional child body
388 if (!IsRoot(cPrim)) 382 if (!IsRoot(cPrim))