aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
index b0a5ef1..4384cdc 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetConstraints.cs
@@ -212,20 +212,28 @@ public sealed class BSLinksetConstraints : BSLinkset
212 // When rebuilding, it is possible to set properties that would normally require a rebuild. 212 // When rebuilding, it is possible to set properties that would normally require a rebuild.
213 // If already rebuilding, don't request another rebuild. 213 // If already rebuilding, don't request another rebuild.
214 // If a linkset with just a root prim (simple non-linked prim) don't bother rebuilding. 214 // If a linkset with just a root prim (simple non-linked prim) don't bother rebuilding.
215 if (!Rebuilding && HasAnyChildren) 215 lock (this)
216 { 216 {
217 // Queue to happen after all the other taint processing 217 if (!RebuildScheduled)
218 m_physicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
219 { 218 {
220 if (HasAnyChildren) 219 if (!Rebuilding && HasAnyChildren)
221 { 220 {
222 // Constraints that have not been changed are not rebuild but make sure 221 RebuildScheduled = true;
223 // the constraint of the requestor is rebuilt. 222 // Queue to happen after all the other taint processing
224 PhysicallyUnlinkAChildFromRoot(LinksetRoot, requestor); 223 m_physicsScene.PostTaintObject("BSLinksetContraints.Refresh", requestor.LocalID, delegate()
225 // Rebuild the linkset and all its constraints. 224 {
226 RecomputeLinksetConstraints(); 225 if (HasAnyChildren)
226 {
227 // Constraints that have not been changed are not rebuild but make sure
228 // the constraint of the requestor is rebuilt.
229 PhysicallyUnlinkAChildFromRoot(LinksetRoot, requestor);
230 // Rebuild the linkset and all its constraints.
231 RecomputeLinksetConstraints();
232 }
233 RebuildScheduled = false;
234 });
227 } 235 }
228 }); 236 }
229 } 237 }
230 } 238 }
231 239