aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorRobert Adams2013-03-23 11:00:52 -0700
committerRobert Adams2013-03-25 15:40:43 -0700
commit953090fd62c2f8647d0e04bc3890a04a7076dbad (patch)
treeaf514b520cd7f5f9edc7de5d4ede87e5ea7cb476 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentBulletSim: parameterize C# HACD hull creation. Add feature of reducing max hu... (diff)
downloadopensim-SC_OLD-953090fd62c2f8647d0e04bc3890a04a7076dbad.zip
opensim-SC_OLD-953090fd62c2f8647d0e04bc3890a04a7076dbad.tar.gz
opensim-SC_OLD-953090fd62c2f8647d0e04bc3890a04a7076dbad.tar.bz2
opensim-SC_OLD-953090fd62c2f8647d0e04bc3890a04a7076dbad.tar.xz
BulletSim: fix possible race condition where an prim's asset can be requested quicker than the asset fetcher returns and thus falsely reporting that an asset was not fetched and defaulting the assset to a bounding box.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index f953c1e..6bb88c7 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -86,7 +86,7 @@ public abstract class BSPhysObject : PhysicsActor
86 PhysBody = new BulletBody(localID); 86 PhysBody = new BulletBody(localID);
87 PhysShape = new BulletShape(); 87 PhysShape = new BulletShape();
88 88
89 LastAssetBuildFailed = false; 89 PrimAssetState = PrimAssetCondition.Unknown;
90 90
91 // Default material type. Also sets Friction, Restitution and Density. 91 // Default material type. Also sets Friction, Restitution and Density.
92 SetMaterial((int)MaterialAttributes.Material.Wood); 92 SetMaterial((int)MaterialAttributes.Material.Wood);
@@ -133,9 +133,13 @@ public abstract class BSPhysObject : PhysicsActor
133 // Reference to the physical shape (btCollisionShape) of this object 133 // Reference to the physical shape (btCollisionShape) of this object
134 public BulletShape PhysShape; 134 public BulletShape PhysShape;
135 135
136 // 'true' if the mesh's underlying asset failed to build. 136 // The physical representation of the prim might require an asset fetch.
137 // This will keep us from looping after the first time the build failed. 137 // The asset state is first 'Unknown' then 'Waiting' then either 'Failed' or 'Fetched'.
138 public bool LastAssetBuildFailed { get; set; } 138 public enum PrimAssetCondition
139 {
140 Unknown, Waiting, Failed, Fetched
141 }
142 public PrimAssetCondition PrimAssetState { get; set; }
139 143
140 // The objects base shape information. Null if not a prim type shape. 144 // The objects base shape information. Null if not a prim type shape.
141 public PrimitiveBaseShape BaseShape { get; protected set; } 145 public PrimitiveBaseShape BaseShape { get; protected set; }