diff options
author | Robert Adams | 2015-08-06 19:57:32 -0700 |
---|---|---|
committer | Robert Adams | 2015-08-06 19:57:32 -0700 |
commit | f0417c5d506e5b562344515f6e68668360456d33 (patch) | |
tree | b5197860eff12d5ce2a5cd20044896bf98d32a66 /OpenSim | |
parent | create osGetAvatarHomeURI (diff) | |
download | opensim-SC_OLD-f0417c5d506e5b562344515f6e68668360456d33.zip opensim-SC_OLD-f0417c5d506e5b562344515f6e68668360456d33.tar.gz opensim-SC_OLD-f0417c5d506e5b562344515f6e68668360456d33.tar.bz2 opensim-SC_OLD-f0417c5d506e5b562344515f6e68668360456d33.tar.xz |
BulletSim: rearrange code and add some tests to try and resolve the
initialization race conditions reported in Mantis 6792.
When a region is initializing it seems that the prim initialization code
can be interrupted part way through then taints are processed for
prims that are not completely there.
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 2 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index d37f29b..87eba33 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -322,7 +322,7 @@ public abstract class BSLinkset | |||
322 | bool ret = true; | 322 | bool ret = true; |
323 | this.ForEachMember((member) => | 323 | this.ForEachMember((member) => |
324 | { | 324 | { |
325 | if (member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) | 325 | if ((!member.IsInitialized) || member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting) |
326 | { | 326 | { |
327 | ret = false; | 327 | ret = false; |
328 | return true; // exit loop | 328 | return true; // exit loop |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index d20d094..b758408 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -83,11 +83,6 @@ public abstract class BSPhysObject : PhysicsActor | |||
83 | // The collection of things that push me around | 83 | // The collection of things that push me around |
84 | PhysicalActors = new BSActorCollection(PhysScene); | 84 | PhysicalActors = new BSActorCollection(PhysScene); |
85 | 85 | ||
86 | // Initialize variables kept in base. | ||
87 | GravModifier = 1.0f; | ||
88 | Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); | ||
89 | HoverActive = false; | ||
90 | |||
91 | // We don't have any physical representation yet. | 86 | // We don't have any physical representation yet. |
92 | PhysBody = new BulletBody(localID); | 87 | PhysBody = new BulletBody(localID); |
93 | PhysShape = new BSShapeNull(); | 88 | PhysShape = new BSShapeNull(); |
@@ -96,6 +91,12 @@ public abstract class BSPhysObject : PhysicsActor | |||
96 | 91 | ||
97 | PrimAssetState = PrimAssetCondition.Unknown; | 92 | PrimAssetState = PrimAssetCondition.Unknown; |
98 | 93 | ||
94 | // Initialize variables kept in base. | ||
95 | // Beware that these cause taints to be queued whch can cause race conditions on startup. | ||
96 | GravModifier = 1.0f; | ||
97 | Gravity = new OMV.Vector3(0f, 0f, BSParam.Gravity); | ||
98 | HoverActive = false; | ||
99 | |||
99 | // Default material type. Also sets Friction, Restitution and Density. | 100 | // Default material type. Also sets Friction, Restitution and Density. |
100 | SetMaterial((int)MaterialAttributes.Material.Wood); | 101 | SetMaterial((int)MaterialAttributes.Material.Wood); |
101 | 102 | ||