aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
authorRobert Adams2014-07-26 16:03:43 -0700
committerJustin Clark-Casey2014-08-02 00:58:27 +0100
commiteedefdc5ff17f52c106d6832bc0cd8c596aefe62 (patch)
treeaf3ef82909396f34b75485f2c67e9e3d069b0758 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
parentAdd inventory.<url>.RequestsMade stat. (diff)
downloadopensim-SC_OLD-eedefdc5ff17f52c106d6832bc0cd8c596aefe62.zip
opensim-SC_OLD-eedefdc5ff17f52c106d6832bc0cd8c596aefe62.tar.gz
opensim-SC_OLD-eedefdc5ff17f52c106d6832bc0cd8c596aefe62.tar.bz2
opensim-SC_OLD-eedefdc5ff17f52c106d6832bc0cd8c596aefe62.tar.xz
BulletSim: rearrange code for sensing whether shapes have been
constructed. Add routine to check for failed and use that method rather than checking individual state.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs25
1 files changed, 13 insertions, 12 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 5a9e9ff..6586099 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -401,20 +401,21 @@ public sealed class BSLinksetCompound : BSLinkset
401 // The linkset must be in an intermediate state where all the children have not yet 401 // The linkset must be in an intermediate state where all the children have not yet
402 // been constructed. This sometimes happens on startup when everything is getting 402 // been constructed. This sometimes happens on startup when everything is getting
403 // built and some shapes have to wait for assets to be read in. 403 // built and some shapes have to wait for assets to be read in.
404 // Just skip this child for the moment and cause the shape to be rebuilt next tick. 404 // Just skip this linkset for the moment and cause the shape to be rebuilt next tick.
405 // One problem might be that the shape is broken somehow and it never becomes completely 405 // One problem might be that the shape is broken somehow and it never becomes completely
406 // available. This might cause the rebuild to happen over and over. 406 // available. This might cause the rebuild to happen over and over.
407 if (LinksetRebuildFailureLoopPrevention-- > 0) 407 LinksetRoot.ForceBodyShapeRebuild(false);
408 { 408 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChildWithNoShape,indx={1},cShape={2},offPos={3},offRot={4}",
409 LinksetRoot.ForceBodyShapeRebuild(false); 409 LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
410 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChildWithNoShape,indx={1},cShape={2},offPos={3},offRot={4}", 410 // Output an annoying warning. It should only happen once but if it keeps coming out,
411 LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot); 411 // the user knows there is something wrong and will report it.
412 // Output an annoying warning. It should only happen once but if it keeps coming out, 412 m_physicsScene.Logger.WarnFormat("{0} Linkset rebuild warning. If this happens more than one or two times, please report in Mantis 7191", LogHeader);
413 // the user knows there is something wrong and will report it. 413 m_physicsScene.Logger.WarnFormat("{0} pName={1}, childIdx={2}, shape={3}",
414 m_physicsScene.Logger.WarnFormat("{0} Linkset rebuild warning. If this happens more than one or two times, please report in Mantis 7191", LogHeader); 414 LogHeader, LinksetRoot.Name, cPrim.LinksetChildIndex, childShape);
415 m_physicsScene.Logger.WarnFormat("{0} pName={1}, childIdx={2}, shape={3}", 415
416 LogHeader, LinksetRoot.Name, cPrim.LinksetChildIndex, childShape); 416 // This causes the loop to bail on building the rest of this linkset.
417 } 417 // The rebuild operation should fix it up or declare the object unbuildable.
418 return true;
418 } 419 }
419 420
420 return false; // 'false' says to move onto the next child in the list 421 return false; // 'false' says to move onto the next child in the list