diff options
author | Charles Krinke | 2008-11-09 18:22:36 +0000 |
---|---|---|
committer | Charles Krinke | 2008-11-09 18:22:36 +0000 |
commit | 8ed4821c4767b792bcebe8d0e898ce5331b27db3 (patch) | |
tree | 8b7ea10ef5d20aaf2b7a449c7f08402da97be21a | |
parent | * Applying EventQueueGetModule patch to try debug the case of the missing EQG. (diff) | |
download | opensim-SC-8ed4821c4767b792bcebe8d0e898ce5331b27db3.zip opensim-SC-8ed4821c4767b792bcebe8d0e898ce5331b27db3.tar.gz opensim-SC-8ed4821c4767b792bcebe8d0e898ce5331b27db3.tar.bz2 opensim-SC-8ed4821c4767b792bcebe8d0e898ce5331b27db3.tar.xz |
Clean up the mass < 0 logic a tiny bit when
calculating mass.
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 3 |
1 files changed, 1 insertions, 2 deletions
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 | |||
604 | volume = (float)volume * ((taperFactorY / 3f) + 0.001f); | 604 | volume = (float)volume * ((taperFactorY / 3f) + 0.001f); |
605 | } | 605 | } |
606 | returnMass = m_density*volume; | 606 | returnMass = m_density*volume; |
607 | 607 | if (returnMass <= 0) returnMass = 0.0001f;//ckrinke: Mass must be greater then zero. | |
608 | return returnMass; | 608 | return returnMass; |
609 | } | 609 | } |
610 | 610 | ||
@@ -617,7 +617,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
617 | float newmass = CalculateMass(); | 617 | float newmass = CalculateMass(); |
618 | //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); | 618 | //m_log.Info("[PHYSICS]: New Mass: " + newmass.ToString()); |
619 | 619 | ||
620 | if (newmass <= 0) newmass = 0.0001f; | ||
621 | d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); | 620 | d.MassSetBoxTotal(out pMass, newmass, _size.X, _size.Y, _size.Z); |
622 | d.BodySetMass(Body, ref pMass); | 621 | d.BodySetMass(Body, ref pMass); |
623 | } | 622 | } |