aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
index 86bbf46..89d0d3e 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
@@ -698,14 +698,19 @@ public class BSShapeCollection : IDisposable
698 return ComputeShapeKey(shapeData, pbs, out lod); 698 return ComputeShapeKey(shapeData, pbs, out lod);
699 } 699 }
700 700
701 // The creation of a mesh or hull can fail if an underlying asset is not available.
702 // There are two cases: 1) the asset is not in the cache and it needs to be fetched;
703 // and 2) the asset cannot be converted (like decompressing JPEG2000s).
704 // The first case causes the asset to be fetched. The second case just requires
705 // us to not loop forever.
706 // Called after creating a physical mesh or hull. If the physical shape was created,
707 // just return.
701 private BulletShape VerifyMeshCreated(BulletShape newShape, BSPhysObject prim, ShapeData shapeData, PrimitiveBaseShape pbs) 708 private BulletShape VerifyMeshCreated(BulletShape newShape, BSPhysObject prim, ShapeData shapeData, PrimitiveBaseShape pbs)
702 { 709 {
703 // If the shape was successfully created, nothing more to do 710 // If the shape was successfully created, nothing more to do
704 if (newShape.ptr != IntPtr.Zero) 711 if (newShape.ptr != IntPtr.Zero)
705 return newShape; 712 return newShape;
706 713
707 // The most common reason for failure is that an underlying asset is not available
708
709 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset 714 // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset
710 if (pbs.SculptEntry && !prim.LastAssetBuildFailed && pbs.SculptTexture != OMV.UUID.Zero) 715 if (pbs.SculptEntry && !prim.LastAssetBuildFailed && pbs.SculptTexture != OMV.UUID.Zero)
711 { 716 {