aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin
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
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')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs1
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs9
2 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index 7b211fa..3c5e6e5 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -173,6 +173,7 @@ public sealed class BSPrim : BSPhysObject
173 } 173 }
174 public override bool ForceBodyShapeRebuild(bool inTaintTime) 174 public override bool ForceBodyShapeRebuild(bool inTaintTime)
175 { 175 {
176 LastAssetBuildFailed = false;
176 BSScene.TaintCallback rebuildOperation = delegate() 177 BSScene.TaintCallback rebuildOperation = delegate()
177 { 178 {
178 _mass = CalculateMass(); // changing the shape changes the mass 179 _mass = CalculateMass(); // changing the shape changes the mass
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 {