Clean up the mass < 0 logic a tiny bit when

calculating mass.
0.6.1-post-fixes
Charles Krinke 2008-11-09 18:22:36 +00:00
parent df8b92cc1e
commit 8ed4821c47
1 changed files with 1 additions and 2 deletions

View File

@ -604,7 +604,7 @@ namespace OpenSim.Region.Physics.OdePlugin
volume = (float)volume * ((taperFactorY / 3f) + 0.001f); volume = (float)volume * ((taperFactorY / 3f) + 0.001f);
} }
returnMass = m_density*volume; returnMass = m_density*volume;
if (returnMass <= 0) returnMass = 0.0001f;//ckrinke: Mass must be greater then zero.
return returnMass; return returnMass;
} }
@ -617,7 +617,6 @@ namespace OpenSim.Region.Physics.OdePlugin
float newmass = CalculateMass(); float newmass = CalculateMass();
//m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString());
if (newmass <= 0) newmass = 0.0001f;
d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z);
d.BodySetMass(Body, ref pMass); d.BodySetMass(Body, ref pMass);
} }