BulletSim: Make BSPrimLinkable 'incomplete' if any of its children are waiting for assets to load.

mb-throttle-test
Robert Adams 2014-10-02 19:00:26 -07:00
parent cf85ade81e
commit eef954a214
1 changed files with 23 additions and 1 deletions

View File

@ -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;
}
}