aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs33
-rw-r--r--bin/OpenSimDefaults.ini8
2 files changed, 36 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 6f4f686..67cb2f6 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -305,6 +305,10 @@ public sealed class BSLinksetCompound : BSLinkset
305 // Note that this works for rebuilding just the root after a linkset is taken apart. 305 // Note that this works for rebuilding just the root after a linkset is taken apart.
306 // Called at taint time!! 306 // Called at taint time!!
307 private bool UseBulletSimRootOffsetHack = false; // Attempt to have Bullet track the coords of root compound shape 307 private bool UseBulletSimRootOffsetHack = false; // Attempt to have Bullet track the coords of root compound shape
308 // Number of times to perform rebuilds on broken linkset children. This should only happen when
309 // a linkset is initially being created and should happen only one or two times at the most.
310 // This exists to cause a looping problem to be reported while not rebuilding a linkset forever.
311 private static int LinksetRebuildFailureLoopPrevention = 10;
308 private void RecomputeLinksetCompound() 312 private void RecomputeLinksetCompound()
309 { 313 {
310 try 314 try
@@ -376,9 +380,32 @@ public sealed class BSLinksetCompound : BSLinkset
376 OMV.Quaternion offsetRot = OMV.Quaternion.Normalize(cPrim.RawOrientation) * invRootOrientation; 380 OMV.Quaternion offsetRot = OMV.Quaternion.Normalize(cPrim.RawOrientation) * invRootOrientation;
377 381
378 // Add the child shape to the compound shape being built 382 // Add the child shape to the compound shape being built
379 m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot); 383 if (childShape.physShapeInfo.HasPhysicalShape)
380 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}", 384 {
381 LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot); 385 m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot);
386 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}",
387 LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
388 }
389 else
390 {
391 // The linkset must be in an intermediate state where all the children have not yet
392 // been constructed. This sometimes happens on startup when everything is getting
393 // built and some shapes have to wait for assets to be read in.
394 // Just skip this child for the moment and cause the shape to be rebuilt next tick.
395 // One problem might be that the shape is broken somehow and it never becomes completely
396 // available. This might cause the rebuild to happen over and over.
397 if (LinksetRebuildFailureLoopPrevention-- > 0)
398 {
399 LinksetRoot.ForceBodyShapeRebuild(false);
400 DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChildWithNoShape,indx={1},cShape={2},offPos={3},offRot={4}",
401 LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot);
402 // Output an annoying warning. It should only happen once but if it keeps coming out,
403 // the user knows there is something wrong and will report it.
404 m_physicsScene.Logger.WarnFormat("{0} Linkset rebuild warning. If this happens more than one or two times, please report in Mantis 7191", LogHeader);
405 m_physicsScene.Logger.WarnFormat("{0} pName={1}, childIdx={2}, shape={3}",
406 LogHeader, LinksetRoot.Name, cPrim.LinksetChildIndex, childShape);
407 }
408 }
382 409
383 // Since we are borrowing the shape of the child, disable the origional child body 410 // Since we are borrowing the shape of the child, disable the origional child body
384 if (!IsRoot(cPrim)) 411 if (!IsRoot(cPrim))
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index 2a7e4c3..b9fd163 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -701,7 +701,7 @@
701 MaxOutgoingTransferVersion = "SIMULATION/0.3" 701 MaxOutgoingTransferVersion = "SIMULATION/0.3"
702 702
703 ; The maximum distance in regions that an agent is allowed to teleport 703 ; The maximum distance in regions that an agent is allowed to teleport
704 ; along the x or y axis. This is set to 16383 because current viewers 704 ; along the x or y axis. This is set to 65535 because current viewers
705 ; can't handle teleports that are greater than this distance 705 ; can't handle teleports that are greater than this distance
706 ; Setting to 0 will allow teleports of any distance 706 ; Setting to 0 will allow teleports of any distance
707 ; 707 ;
@@ -1755,8 +1755,12 @@
1755 1755
1756 1756
1757[Terrain] 1757[Terrain]
1758 ; Values can be "pinhead-island" or "flat"
1758 InitialTerrain = "pinhead-island" 1759 InitialTerrain = "pinhead-island"
1759 1760 ; If 'true' each avatar is only sent terrain patches within their view distance
1761 ; This also changes the region terrain loading from 'lawn mower' to ordered around
1762 ; the avatar outward.
1763 SendTerrainUpdatesByViewDistance = False
1760 1764
1761;; 1765;;
1762;; If you are using a simian grid frontend you can enable 1766;; If you are using a simian grid frontend you can enable