aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
diff options
context:
space:
mode:
authorMelanie2012-10-02 23:02:53 +0100
committerMelanie2012-10-02 23:02:53 +0100
commitca5c0814f4c6e286e24e1971620aec3c0ee1c2d3 (patch)
treef630648180aca5a498cb674bfb1f967eb9bcb260 /OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
parentAttempt to fix Mantis #6311. Honor a destination folder if one is given (diff)
parentcorrecting typo (diff)
downloadopensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.zip
opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.gz
opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.bz2
opensim-SC-ca5c0814f4c6e286e24e1971620aec3c0ee1c2d3.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs20
1 files changed, 9 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index 4f225ae..3e82642 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -34,7 +34,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin
34{ 34{
35public class BSLinkset 35public class BSLinkset
36{ 36{
37 private static string LogHeader = "[BULLETSIM LINKSET]"; 37 // private static string LogHeader = "[BULLETSIM LINKSET]";
38 38
39 public BSPhysObject LinksetRoot { get; protected set; } 39 public BSPhysObject LinksetRoot { get; protected set; }
40 40
@@ -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