BulletSim: fix a recursive loop when fetching the mass of the root of a linkset.

0.7.4.1
Robert Adams 2012-07-26 15:24:53 -07:00
parent 7d30637d51
commit ce812c88cc
2 changed files with 4 additions and 4 deletions

View File

@ -50,7 +50,7 @@ public class BSLinkset
// We keep the prim's mass in the linkset structure since it could be dependent on other prims
private float m_mass;
public float Mass
public float LinksetMass
{
get
{
@ -150,10 +150,10 @@ public class BSLinkset
private float ComputeLinksetMass()
{
float mass = m_linksetRoot.Mass;
float mass = m_linksetRoot.MassRaw;
foreach (BSPrim bp in m_children)
{
mass += bp.Mass;
mass += bp.MassRaw;
}
return mass;
}

View File

@ -289,7 +289,7 @@ public sealed class BSPrim : PhysicsActor
{
get
{
return _linkset.Mass;
return _linkset.LinksetMass;
}
}