aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-24 08:56:02 -0800
committerRobert Adams2012-12-24 08:56:02 -0800
commit80cee1b85a646045c02e2bb675056d532ce2fe27 (patch)
treedc9347a2eeb3241cdd30f50d448b630ce5d5c4f9 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
parent* Update BulletSimN terrain implementation to default to Heightfield, it's le... (diff)
downloadopensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.zip
opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.gz
opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.bz2
opensim-SC_OLD-80cee1b85a646045c02e2bb675056d532ce2fe27.tar.xz
BulletSim: Fix single physical prim reporting its mass as zero.
Properly return root mass as mass of just the root prim rather than the mass of the linkset. SOG has the logic to add the masses together to get the linkset mass. Update TODO list.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index 2a7b72c..d5cbf5f 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -5,7 +5,7 @@
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclat simer.
9 * * Redistributions in binary form must reproduce the above copyrightD 9 * * Redistributions in binary form must reproduce the above copyrightD
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
@@ -89,6 +89,8 @@ public sealed class BSLinksetCompound : BSLinkset
89 // its internal properties. 89 // its internal properties.
90 public override void Refresh(BSPhysObject requestor) 90 public override void Refresh(BSPhysObject requestor)
91 { 91 {
92 base.Refresh(requestor);
93
92 // Something changed so do the rebuilding thing 94 // Something changed so do the rebuilding thing
93 // ScheduleRebuild(); 95 // ScheduleRebuild();
94 } 96 }
@@ -96,13 +98,13 @@ public sealed class BSLinksetCompound : BSLinkset
96 // Schedule a refresh to happen after all the other taint processing. 98 // Schedule a refresh to happen after all the other taint processing.
97 private void ScheduleRebuild(BSPhysObject requestor) 99 private void ScheduleRebuild(BSPhysObject requestor)
98 { 100 {
99 DetailLog("{0},BSLinksetCompound.Refresh,schedulingRefresh,rebuilding={1}", 101 DetailLog("{0},BSLinksetCompound.ScheduleRebuild,,rebuilding={1}",
100 requestor.LocalID, Rebuilding); 102 requestor.LocalID, Rebuilding);
101 // When rebuilding, it is possible to set properties that would normally require a rebuild. 103 // When rebuilding, it is possible to set properties that would normally require a rebuild.
102 // If already rebuilding, don't request another rebuild. 104 // If already rebuilding, don't request another rebuild.
103 if (!Rebuilding) 105 if (!Rebuilding)
104 { 106 {
105 PhysicsScene.PostTaintObject("BSLinksetCompound.Refresh", LinksetRoot.LocalID, delegate() 107 PhysicsScene.PostTaintObject("BSLinksetCompound.ScheduleRebuild", LinksetRoot.LocalID, delegate()
106 { 108 {
107 if (HasAnyChildren) 109 if (HasAnyChildren)
108 RecomputeLinksetCompound(); 110 RecomputeLinksetCompound();
@@ -123,7 +125,6 @@ public sealed class BSLinksetCompound : BSLinkset
123 if (IsRoot(child)) 125 if (IsRoot(child))
124 { 126 {
125 // The root is going dynamic. Make sure mass is properly set. 127 // The root is going dynamic. Make sure mass is properly set.
126 m_mass = ComputeLinksetMass();
127 ScheduleRebuild(LinksetRoot); 128 ScheduleRebuild(LinksetRoot);
128 } 129 }
129 else 130 else
@@ -377,8 +378,8 @@ public sealed class BSLinksetCompound : BSLinkset
377 }); 378 });
378 379
379 // With all of the linkset packed into the root prim, it has the mass of everyone. 380 // With all of the linkset packed into the root prim, it has the mass of everyone.
380 float linksetMass = LinksetMass; 381 LinksetMass = LinksetMass;
381 LinksetRoot.UpdatePhysicalMassProperties(linksetMass); 382 LinksetRoot.UpdatePhysicalMassProperties(LinksetMass, true);
382 } 383 }
383 finally 384 finally
384 { 385 {