diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 11 |
1 files changed, 10 insertions, 1 deletions
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 | |||
179 | public bool m_outofBounds; | 179 | public bool m_outofBounds; |
180 | private float m_density = 10.000006836f; // Aluminum g/cm3; | 180 | private float m_density = 10.000006836f; // Aluminum g/cm3; |
181 | 181 | ||
182 | private float m_primMass = 10.000006836f; // Aluminum g/cm3; | ||
183 | |||
182 | private byte m_shapetype; | 184 | private byte m_shapetype; |
183 | private byte m_taintshapetype; | 185 | private byte m_taintshapetype; |
184 | 186 | ||
@@ -538,7 +540,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
538 | 540 | ||
539 | public override float Mass | 541 | public override float Mass |
540 | { | 542 | { |
541 | get { return CalculateMass(); } | 543 | get |
544 | { | ||
545 | CalculateMass(); | ||
546 | return m_primMass; | ||
547 | } | ||
542 | } | 548 | } |
543 | 549 | ||
544 | public override Vector3 Force | 550 | public override Vector3 Force |
@@ -1316,6 +1322,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1316 | 1322 | ||
1317 | 1323 | ||
1318 | 1324 | ||
1325 | m_primMass = returnMass; | ||
1326 | if (m_primMass > _parent_scene.maximumMassObject) | ||
1327 | m_primMass = _parent_scene.maximumMassObject; | ||
1319 | 1328 | ||
1320 | // Recursively calculate mass | 1329 | // Recursively calculate mass |
1321 | bool HasChildPrim = false; | 1330 | bool HasChildPrim = false; |