BulletSim: fix a recursive loop when fetching the mass of the root of a linkset.
parent
7d30637d51
commit
ce812c88cc
|
@ -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
|
// We keep the prim's mass in the linkset structure since it could be dependent on other prims
|
||||||
private float m_mass;
|
private float m_mass;
|
||||||
public float Mass
|
public float LinksetMass
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -150,10 +150,10 @@ public class BSLinkset
|
||||||
|
|
||||||
private float ComputeLinksetMass()
|
private float ComputeLinksetMass()
|
||||||
{
|
{
|
||||||
float mass = m_linksetRoot.Mass;
|
float mass = m_linksetRoot.MassRaw;
|
||||||
foreach (BSPrim bp in m_children)
|
foreach (BSPrim bp in m_children)
|
||||||
{
|
{
|
||||||
mass += bp.Mass;
|
mass += bp.MassRaw;
|
||||||
}
|
}
|
||||||
return mass;
|
return mass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -289,7 +289,7 @@ public sealed class BSPrim : PhysicsActor
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _linkset.Mass;
|
return _linkset.LinksetMass;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue