From 3a458e2a36253f6514720213deaa19372b06cc52 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 10 Oct 2012 13:56:16 -0700 Subject: BulletSim: Use full linkset mass when computing vehicle gravity force. Add taint-time specification to new AddForce(). --- OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index b84ccdc..43b1262 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs @@ -165,13 +165,11 @@ public class BSLinkset // May be called at runtime or taint-time (just pass the appropriate flag). public void Refresh(BSPhysObject requestor, bool inTaintTime) { - // If there are no children, there can't be any constraints to recompute - if (!HasAnyChildren) + // If there are no children, not physical or not root, I am not the one that recomputes the constraints + // (For the moment, static linksets do create constraints so remove the test for physical.) + if (!HasAnyChildren || /*!requestor.IsPhysical ||*/ !IsRoot(requestor)) return; - // Only the root does the recomputation - if (IsRoot(requestor)) - { BSScene.TaintCallback refreshOperation = delegate() { RecomputeLinksetConstraintVariables(); @@ -182,7 +180,6 @@ public class BSLinkset refreshOperation(); else PhysicsScene.TaintedObject("BSLinkSet.Refresh", refreshOperation); - } } // The object is going dynamic (physical). Do any setup necessary -- cgit v1.1