aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorRobert Adams2012-07-26 15:24:53 -0700
committerRobert Adams2012-07-26 16:06:00 -0700
commitce812c88ccc9226167b049e49296892943409e3f (patch)
tree8f6be437bf0bf2079290d5e4d255ce7af81c93fc /OpenSim/Region/Physics
parentBulletSim: refactor all the linkset logic out of the prim class (diff)
downloadopensim-SC_OLD-ce812c88ccc9226167b049e49296892943409e3f.zip
opensim-SC_OLD-ce812c88ccc9226167b049e49296892943409e3f.tar.gz
opensim-SC_OLD-ce812c88ccc9226167b049e49296892943409e3f.tar.bz2
opensim-SC_OLD-ce812c88ccc9226167b049e49296892943409e3f.tar.xz
BulletSim: fix a recursive loop when fetching the mass of the root of a linkset.
Diffstat (limited to 'OpenSim/Region/Physics')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs6
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs2
2 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
index a1027ee..3bc2100 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs
@@ -50,7 +50,7 @@ public class BSLinkset
50 50
51 // We keep the prim's mass in the linkset structure since it could be dependent on other prims 51 // We keep the prim's mass in the linkset structure since it could be dependent on other prims
52 private float m_mass; 52 private float m_mass;
53 public float Mass 53 public float LinksetMass
54 { 54 {
55 get 55 get
56 { 56 {
@@ -150,10 +150,10 @@ public class BSLinkset
150 150
151 private float ComputeLinksetMass() 151 private float ComputeLinksetMass()
152 { 152 {
153 float mass = m_linksetRoot.Mass; 153 float mass = m_linksetRoot.MassRaw;
154 foreach (BSPrim bp in m_children) 154 foreach (BSPrim bp in m_children)
155 { 155 {
156 mass += bp.Mass; 156 mass += bp.MassRaw;
157 } 157 }
158 return mass; 158 return mass;
159 } 159 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
index d604f9c..7590d93 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs
@@ -289,7 +289,7 @@ public sealed class BSPrim : PhysicsActor
289 { 289 {
290 get 290 get
291 { 291 {
292 return _linkset.Mass; 292 return _linkset.LinksetMass;
293 } 293 }
294 } 294 }
295 295