diff options
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 77f69a5..87eba33 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -128,6 +128,7 @@ public abstract class BSLinkset | |||
128 | m_children = new Dictionary<BSPrimLinkable, BSLinkInfo>(); | 128 | m_children = new Dictionary<BSPrimLinkable, BSLinkInfo>(); |
129 | LinksetMass = parent.RawMass; | 129 | LinksetMass = parent.RawMass; |
130 | Rebuilding = false; | 130 | Rebuilding = false; |
131 | RebuildScheduled = false; | ||
131 | 132 | ||
132 | parent.ClearDisplacement(); | 133 | parent.ClearDisplacement(); |
133 | } | 134 | } |
@@ -297,8 +298,16 @@ public abstract class BSLinkset | |||
297 | 298 | ||
298 | // Flag denoting the linkset is in the process of being rebuilt. | 299 | // Flag denoting the linkset is in the process of being rebuilt. |
299 | // Used to know not the schedule a rebuild in the middle of a rebuild. | 300 | // Used to know not the schedule a rebuild in the middle of a rebuild. |
301 | // Because of potential update calls that could want to schedule another rebuild. | ||
300 | protected bool Rebuilding { get; set; } | 302 | protected bool Rebuilding { get; set; } |
301 | 303 | ||
304 | // Flag saying a linkset rebuild has been scheduled. | ||
305 | // This is turned on when the rebuild is requested and turned off when | ||
306 | // the rebuild is complete. Used to limit modifications to the | ||
307 | // linkset parameters while the linkset is in an intermediate state. | ||
308 | // Protected by a "lock(m_linsetActivityLock)" on the BSLinkset object | ||
309 | public bool RebuildScheduled { get; protected set; } | ||
310 | |||
302 | // The object is going dynamic (physical). Do any setup necessary | 311 | // The object is going dynamic (physical). Do any setup necessary |
303 | // for a dynamic linkset. | 312 | // for a dynamic linkset. |
304 | // Only the state of the passed object can be modified. The rest of the linkset | 313 | // Only the state of the passed object can be modified. The rest of the linkset |
@@ -307,6 +316,23 @@ public abstract class BSLinkset | |||
307 | // Called at taint-time! | 316 | // Called at taint-time! |
308 | public abstract bool MakeDynamic(BSPrimLinkable child); | 317 | public abstract bool MakeDynamic(BSPrimLinkable child); |
309 | 318 | ||
319 | public virtual bool AllPartsComplete | ||
320 | { | ||
321 | get { | ||
322 | bool ret = true; | ||
323 | this.ForEachMember((member) => | ||
324 | { | ||
325 | if ((!member.IsInitialized) || 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 | |||
310 | // The object is going static (non-physical). Do any setup necessary | 336 | // The object is going static (non-physical). Do any setup necessary |
311 | // for a static linkset. | 337 | // for a static linkset. |
312 | // Return 'true' if any properties updated on the passed object. | 338 | // Return 'true' if any properties updated on the passed object. |