From eef954a214b9aed2132dd6e495c6be98157ea4aa Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 2 Oct 2014 19:00:26 -0700 Subject: BulletSim: Make BSPrimLinkable 'incomplete' if any of its children are waiting for assets to load. --- .../Region/Physics/BulletSPlugin/BSPrimLinkable.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs index cdd912d..9301e52 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs @@ -58,7 +58,29 @@ public class BSPrimLinkable : BSPrimDisplaced { get { - return base.IsIncomplete || Linkset.RebuildScheduled ; + // A linkset is incomplete when base objects are incomplete, waiting for assets, + // or being rebuilt. + bool ret = false; + if (base.IsIncomplete || Linkset.RebuildScheduled) + { + ret = true; + } + else + { + if (Linkset.IsRoot(this)) + { + Linkset.ForEachMember((member) => + { + if (member.PrimAssetState == PrimAssetCondition.Waiting) + { + ret = true; + return true; + } + return false; + }); + } + } + return ret; } } -- cgit v1.1