From 39079a62c038986b20ccc3cf89a2e169f6e6135f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 9 Apr 2012 20:58:40 +0100 Subject: chODE and ubitODE always return prim mass (they where returning object mass on physical prims) so SOG can do the total add. (ubitODE as more code to use a simpler terrain geom on a modified ode lib but should do autodetect and work with normal lib). --- OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/ChOdePlugin') diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 3e2b71c..77ea2af 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs @@ -179,6 +179,8 @@ namespace OpenSim.Region.Physics.OdePlugin public bool m_outofBounds; private float m_density = 10.000006836f; // Aluminum g/cm3; + private float m_primMass = 10.000006836f; // Aluminum g/cm3; + private byte m_shapetype; private byte m_taintshapetype; @@ -538,7 +540,11 @@ namespace OpenSim.Region.Physics.OdePlugin public override float Mass { - get { return CalculateMass(); } + get + { + CalculateMass(); + return m_primMass; + } } public override Vector3 Force @@ -1316,6 +1322,9 @@ namespace OpenSim.Region.Physics.OdePlugin + m_primMass = returnMass; + if (m_primMass > _parent_scene.maximumMassObject) + m_primMass = _parent_scene.maximumMassObject; // Recursively calculate mass bool HasChildPrim = false; -- cgit v1.1