aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs18
1 files changed, 8 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index a7aaf9b..3e82642 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -331,21 +331,21 @@ public class BSLinkset
331 m_children.Add(child); 331 m_children.Add(child);
332 332
333 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now 333 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now
334 BulletBody rootBodyx = LinksetRoot.BSBody;
335 BSPhysObject childx = child; 334 BSPhysObject childx = child;
336 BulletBody childBodyx = child.BSBody;
337 335
338 DetailLog("{0},AddChildToLinkset,call,rID={1},rBody={2},cID={3},cBody={4}", 336 DetailLog("{0},AddChildToLinkset,call,rID={1},rBody={2},cID={3},cBody={4}",
339 rootx.LocalID, 337 rootx.LocalID,
340 rootx.LocalID, rootBodyx.ptr.ToString("X"), 338 rootx.LocalID, rootx.BSBody.ptr.ToString("X"),
341 childx.LocalID, childBodyx.ptr.ToString("X")); 339 childx.LocalID, childx.BSBody.ptr.ToString("X"));
342 340
343 PhysicsScene.TaintedObject("AddChildToLinkset", delegate() 341 PhysicsScene.TaintedObject("AddChildToLinkset", delegate()
344 { 342 {
345 DetailLog("{0},AddChildToLinkset,taint,child={1}", LinksetRoot.LocalID, child.LocalID); 343 DetailLog("{0},AddChildToLinkset,taint,child={1}", LinksetRoot.LocalID, child.LocalID);
346 // build the physical binding between me and the child 344 // build the physical binding between me and the child
347 m_taintChildren.Add(childx); 345 m_taintChildren.Add(childx);
348 PhysicallyLinkAChildToRoot(rootx, rootBodyx, childx, childBodyx); 346
347 // Since this is taint-time, the body and shape could have changed for the child
348 PhysicallyLinkAChildToRoot(rootx, rootx.BSBody, childx, childx.BSBody);
349 }); 349 });
350 } 350 }
351 return; 351 return;
@@ -369,21 +369,19 @@ public class BSLinkset
369 if (m_children.Remove(child)) 369 if (m_children.Remove(child))
370 { 370 {
371 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now 371 BSPhysObject rootx = LinksetRoot; // capture the root and body as of now
372 BulletBody rootBodyx = LinksetRoot.BSBody;
373 BSPhysObject childx = child; 372 BSPhysObject childx = child;
374 BulletBody childBodyx = child.BSBody;
375 373
376 DetailLog("{0},RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}", 374 DetailLog("{0},RemoveChildFromLinkset,call,rID={1},rBody={2},cID={3},cBody={4}",
377 childx.LocalID, 375 childx.LocalID,
378 rootx.LocalID, rootBodyx.ptr.ToString("X"), 376 rootx.LocalID, rootx.BSBody.ptr.ToString("X"),
379 childx.LocalID, childBodyx.ptr.ToString("X")); 377 childx.LocalID, childx.BSBody.ptr.ToString("X"));
380 378
381 PhysicsScene.TaintedObject("RemoveChildFromLinkset", delegate() 379 PhysicsScene.TaintedObject("RemoveChildFromLinkset", delegate()
382 { 380 {
383 if (m_taintChildren.Contains(childx)) 381 if (m_taintChildren.Contains(childx))
384 m_taintChildren.Remove(childx); 382 m_taintChildren.Remove(childx);
385 383
386 PhysicallyUnlinkAChildFromRoot(rootx, rootBodyx, childx, childBodyx); 384 PhysicallyUnlinkAChildFromRoot(rootx, rootx.BSBody, childx, childx.BSBody);
387 RecomputeLinksetConstraintVariables(); 385 RecomputeLinksetConstraintVariables();
388 }); 386 });
389 387