aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
diff options
context:
space:
mode:
authorRobert Adams2012-10-22 09:12:06 -0700
committerRobert Adams2012-10-22 22:24:51 -0700
commit7272a4cae835f2d3d2a696241c6e6eb5f4b5af54 (patch)
treee833f70b32e912fadb297cc2f92aaa49313aba42 /OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs
parentBulletSim: remove trailing spaces to make git happy. (diff)
downloadopensim-SC_OLD-7272a4cae835f2d3d2a696241c6e6eb5f4b5af54.zip
opensim-SC_OLD-7272a4cae835f2d3d2a696241c6e6eb5f4b5af54.tar.gz
opensim-SC_OLD-7272a4cae835f2d3d2a696241c6e6eb5f4b5af54.tar.bz2
opensim-SC_OLD-7272a4cae835f2d3d2a696241c6e6eb5f4b5af54.tar.xz
BulletSim: fix problem of not rebuilding shape by clearing last rebuild failed flag in BSPrim.ForceBodyShapeRebuild()
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 {