aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorRobert Adams2013-05-10 14:48:52 -0700
committerRobert Adams2013-05-10 14:48:52 -0700
commita42bb799cca27c0dddbecbd2edd2bd5e6d379472 (patch)
tree1a05aecae3e82788da6a5595d04859b8226031b2 /OpenSim/Region
parentImplement delete key for local console (diff)
downloadopensim-SC_OLD-a42bb799cca27c0dddbecbd2edd2bd5e6d379472.zip
opensim-SC_OLD-a42bb799cca27c0dddbecbd2edd2bd5e6d379472.tar.gz
opensim-SC_OLD-a42bb799cca27c0dddbecbd2edd2bd5e6d379472.tar.bz2
opensim-SC_OLD-a42bb799cca27c0dddbecbd2edd2bd5e6d379472.tar.xz
BulletSim: fix CPU loop that occurs when any 'degenerate' sculptie
is in a region. This fixes the high CPU usage for regions with nothing else going on.
Diffstat (limited to 'OpenSim/Region')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapes.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
index 9d47657..262d734 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapes.cs
@@ -368,9 +368,10 @@ public class BSShapeMesh : BSShape
368 368
369 // Check to see if mesh was created (might require an asset). 369 // Check to see if mesh was created (might require an asset).
370 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 370 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
371 if (!newShape.isNativeShape) 371 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
372 { 372 {
373 // If a mesh was what was created, remember the built shape for later sharing. 373 // If a mesh was what was created, remember the built shape for later sharing.
374 // Also note that if meshing failed we put it in the mesh list as there is nothing else to do about the mesh.
374 Meshes.Add(newMeshKey, retMesh); 375 Meshes.Add(newMeshKey, retMesh);
375 } 376 }
376 377
@@ -481,8 +482,11 @@ public class BSShapeMesh : BSShape
481 } 482 }
482 else 483 else
483 { 484 {
485 // Force the asset condition to 'failed' so we won't try to keep fetching and processing this mesh.
486 prim.PrimAssetState = BSPhysObject.PrimAssetCondition.Failed;
484 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}", 487 physicsScene.Logger.DebugFormat("{0} All mesh triangles degenerate. Prim {1} at {2} in {3}",
485 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name); 488 LogHeader, prim.PhysObjectName, prim.RawPosition, physicsScene.Name);
489 physicsScene.DetailLog("{0},BSShapeMesh.CreatePhysicalMesh,allDegenerate,key={1}", prim.LocalID, newMeshKey);
486 } 490 }
487 } 491 }
488 newShape.shapeKey = newMeshKey; 492 newShape.shapeKey = newMeshKey;
@@ -521,7 +525,7 @@ public class BSShapeHull : BSShape
521 525
522 // Check to see if hull was created (might require an asset). 526 // Check to see if hull was created (might require an asset).
523 newShape = VerifyMeshCreated(physicsScene, newShape, prim); 527 newShape = VerifyMeshCreated(physicsScene, newShape, prim);
524 if (!newShape.isNativeShape) 528 if (!newShape.isNativeShape || prim.PrimAssetState == BSPhysObject.PrimAssetCondition.Failed)
525 { 529 {
526 // If a mesh was what was created, remember the built shape for later sharing. 530 // If a mesh was what was created, remember the built shape for later sharing.
527 Hulls.Add(newHullKey, retHull); 531 Hulls.Add(newHullKey, retHull);