aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2014-10-03 10:27:48 -0700
committerRobert Adams2014-11-30 19:52:59 -0800
commit41a943bfd01a8d9463a6621c1f248829637ccb28 (patch)
treece765979e942fd3601ccd60c8b328f5714048051 /OpenSim
parentBulletSim: Make BSPrimLinkable 'incomplete' if any of its children are waitin... (diff)
downloadopensim-SC_OLD-41a943bfd01a8d9463a6621c1f248829637ccb28.zip
opensim-SC_OLD-41a943bfd01a8d9463a6621c1f248829637ccb28.tar.gz
opensim-SC_OLD-41a943bfd01a8d9463a6621c1f248829637ccb28.tar.bz2
opensim-SC_OLD-41a943bfd01a8d9463a6621c1f248829637ccb28.tar.xz
BulletSim: add BSLinkset.AllPartsComplete that checks of all linkset members are not Incomplete and not waiting for assets. Change BSPrimLinkable to use AllPartsComplete.
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs17
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs22
2 files changed, 18 insertions, 21 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index e7b10fe..c0f8c2a 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -316,6 +316,23 @@ public abstract class BSLinkset
316 // Called at taint-time! 316 // Called at taint-time!
317 public abstract bool MakeDynamic(BSPrimLinkable child); 317 public abstract bool MakeDynamic(BSPrimLinkable child);
318 318
319 public virtual bool AllPartsComplete
320 {
321 get {
322 bool ret = true;
323 this.ForEachMember((member) =>
324 {
325 if (member.IsIncomplete || member.PrimAssetState == BSPhysObject.PrimAssetCondition.Waiting)
326 {
327 ret = false;
328 return true; // exit loop
329 }
330 return false; // continue loop
331 });
332 return ret;
333 }
334 }
335
319 // The object is going static (non-physical). Do any setup necessary 336 // The object is going static (non-physical). Do any setup necessary
320 // for a static linkset. 337 // for a static linkset.
321 // Return 'true' if any properties updated on the passed object. 338 // Return 'true' if any properties updated on the passed object.
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
index 9301e52..c293e8c 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
@@ -60,27 +60,7 @@ public class BSPrimLinkable : BSPrimDisplaced
60 { 60 {
61 // A linkset is incomplete when base objects are incomplete, waiting for assets, 61 // A linkset is incomplete when base objects are incomplete, waiting for assets,
62 // or being rebuilt. 62 // or being rebuilt.
63 bool ret = false; 63 return (base.IsIncomplete || Linkset.RebuildScheduled || !Linkset.AllPartsComplete);
64 if (base.IsIncomplete || Linkset.RebuildScheduled)
65 {
66 ret = true;
67 }
68 else
69 {
70 if (Linkset.IsRoot(this))
71 {
72 Linkset.ForEachMember((member) =>
73 {
74 if (member.PrimAssetState == PrimAssetCondition.Waiting)
75 {
76 ret = true;
77 return true;
78 }
79 return false;
80 });
81 }
82 }
83 return ret;
84 } 64 }
85 } 65 }
86 66