diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 1 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 9 |
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 | { |