From 0dc14b5f35c520eae8653cd6add78d648cade8e0 Mon Sep 17 00:00:00 2001 From: Michael Cerquoni Date: Fri, 6 Jun 2014 22:29:04 -0400 Subject: [PATCH 1/3] fix the comment section of max_distance setting to reflect default value --- bin/OpenSimDefaults.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 2a7e4c33b2..7f6d0e6e97 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -701,7 +701,7 @@ MaxOutgoingTransferVersion = "SIMULATION/0.3" ; The maximum distance in regions that an agent is allowed to teleport - ; along the x or y axis. This is set to 16383 because current viewers + ; along the x or y axis. This is set to 65535 because current viewers ; can't handle teleports that are greater than this distance ; Setting to 0 will allow teleports of any distance ; From 3552cfb1a520d75211ed88b38342d9b141c46d28 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 8 Jun 2014 09:03:38 -0700 Subject: [PATCH 2/3] BulletSim: fix exceptions while rebuilding linksets with mesh children. This should get around the exception reported in Mantis 7191 and 7204 by checking for the unbuilt child and rebuilding the linkset the next tick. A warning message is output when this rebuild happens and this message is clamped to 10 times in case there is a problem with a loop. --- .../BulletSPlugin/BSLinksetCompound.cs | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 6f4f6865a6..67cb2f6480 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs @@ -305,6 +305,10 @@ public sealed class BSLinksetCompound : BSLinkset // Note that this works for rebuilding just the root after a linkset is taken apart. // Called at taint time!! private bool UseBulletSimRootOffsetHack = false; // Attempt to have Bullet track the coords of root compound shape + // Number of times to perform rebuilds on broken linkset children. This should only happen when + // a linkset is initially being created and should happen only one or two times at the most. + // This exists to cause a looping problem to be reported while not rebuilding a linkset forever. + private static int LinksetRebuildFailureLoopPrevention = 10; private void RecomputeLinksetCompound() { try @@ -376,9 +380,32 @@ public sealed class BSLinksetCompound : BSLinkset OMV.Quaternion offsetRot = OMV.Quaternion.Normalize(cPrim.RawOrientation) * invRootOrientation; // Add the child shape to the compound shape being built - m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot); - DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}", - LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot); + if (childShape.physShapeInfo.HasPhysicalShape) + { + m_physicsScene.PE.AddChildShapeToCompoundShape(linksetShape.physShapeInfo, childShape.physShapeInfo, offsetPos, offsetRot); + DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChild,indx={1},cShape={2},offPos={3},offRot={4}", + LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot); + } + else + { + // The linkset must be in an intermediate state where all the children have not yet + // been constructed. This sometimes happens on startup when everything is getting + // built and some shapes have to wait for assets to be read in. + // Just skip this child for the moment and cause the shape to be rebuilt next tick. + // One problem might be that the shape is broken somehow and it never becomes completely + // available. This might cause the rebuild to happen over and over. + if (LinksetRebuildFailureLoopPrevention-- > 0) + { + LinksetRoot.ForceBodyShapeRebuild(false); + DetailLog("{0},BSLinksetCompound.RecomputeLinksetCompound,addChildWithNoShape,indx={1},cShape={2},offPos={3},offRot={4}", + LinksetRoot.LocalID, cPrim.LinksetChildIndex, childShape, offsetPos, offsetRot); + // Output an annoying warning. It should only happen once but if it keeps coming out, + // the user knows there is something wrong and will report it. + m_physicsScene.Logger.WarnFormat("{0} Linkset rebuild warning. If this happens more than one or two times, please report in Mantis 7191", LogHeader); + m_physicsScene.Logger.WarnFormat("{0} pName={1}, childIdx={2}, shape={3}", + LogHeader, LinksetRoot.Name, cPrim.LinksetChildIndex, childShape); + } + } // Since we are borrowing the shape of the child, disable the origional child body if (!IsRoot(cPrim)) From 8956cdc55f2115ae6216c67a6e287c851e4291a1 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 8 Jun 2014 09:50:31 -0700 Subject: [PATCH 3/3] Add [Terrain]SendTerrainUpdatesByViewDistance=false to OpenSimDefaults.ini so people can find the setting. --- bin/OpenSimDefaults.ini | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index 7f6d0e6e97..b9fd163169 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -1755,8 +1755,12 @@ [Terrain] + ; Values can be "pinhead-island" or "flat" InitialTerrain = "pinhead-island" - + ; If 'true' each avatar is only sent terrain patches within their view distance + ; This also changes the region terrain loading from 'lawn mower' to ordered around + ; the avatar outward. + SendTerrainUpdatesByViewDistance = False ;; ;; If you are using a simian grid frontend you can enable