diff options
author | UbitUmarov | 2012-04-09 20:58:40 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-09 20:58:40 +0100 |
commit | 39079a62c038986b20ccc3cf89a2e169f6e6135f (patch) | |
tree | 465e2c3a2dae0a9351f4f673c78df6175ec05555 /OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | |
parent | llGetMass and llGetObjectMass (and push estimation) always use object mass a... (diff) | |
download | opensim-SC_OLD-39079a62c038986b20ccc3cf89a2e169f6e6135f.zip opensim-SC_OLD-39079a62c038986b20ccc3cf89a2e169f6e6135f.tar.gz opensim-SC_OLD-39079a62c038986b20ccc3cf89a2e169f6e6135f.tar.bz2 opensim-SC_OLD-39079a62c038986b20ccc3cf89a2e169f6e6135f.tar.xz |
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).
Diffstat (limited to 'OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs')
-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; |