From 8ed4821c4767b792bcebe8d0e898ce5331b27db3 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 9 Nov 2008 18:22:36 +0000 Subject: Clean up the mass < 0 logic a tiny bit when calculating mass. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 452317a..79a7519 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -604,7 +604,7 @@ namespace OpenSim.Region.Physics.OdePlugin volume = (float)volume * ((taperFactorY / 3f) + 0.001f); } returnMass = m_density*volume; - + if (returnMass <= 0) returnMass = 0.0001f;//ckrinke: Mass must be greater then zero. return returnMass; } @@ -617,7 +617,6 @@ namespace OpenSim.Region.Physics.OdePlugin float newmass = CalculateMass(); //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.BodySetMass(Body, ref pMass); } -- cgit v1.1