From 67d92e4e168bf0861024e3be5cd069c77c9144f6 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 6 Feb 2013 11:49:10 -0800 Subject: BulletSim: remove an exception which occurs if a physics mesh asset is not found. --- OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs index f59b9d9..fe0f984 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSShapeCollection.cs @@ -895,9 +895,11 @@ public sealed class BSShapeCollection : IDisposable // If this mesh has an underlying asset and we have not failed getting it before, fetch the asset if (prim.BaseShape.SculptEntry && !prim.LastAssetBuildFailed && prim.BaseShape.SculptTexture != OMV.UUID.Zero) { + DetailLog("{0},BSShapeCollection.VerifyMeshCreated,fetchAsset,lastFailed={1}", prim.LocalID, prim.LastAssetBuildFailed); + // This will prevent looping through this code as we keep trying to get the failed shape prim.LastAssetBuildFailed = true; + BSPhysObject xprim = prim; - DetailLog("{0},BSShapeCollection.VerifyMeshCreated,fetchAsset,lastFailed={1}", prim.LocalID, prim.LastAssetBuildFailed); Util.FireAndForget(delegate { RequestAssetDelegate assetProvider = PhysicsScene.RequestAssetMethod; @@ -908,7 +910,7 @@ public sealed class BSShapeCollection : IDisposable { bool assetFound = false; // DEBUG DEBUG string mismatchIDs = String.Empty; // DEBUG DEBUG - if (yprim.BaseShape.SculptEntry) + if (asset != null && yprim.BaseShape.SculptEntry) { if (yprim.BaseShape.SculptTexture.ToString() == asset.ID) { -- cgit v1.1