aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index d5cbf5f..19ce62b 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 disclat simer. 8 * notice, this list of conditions and the following disclaimer.
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.
@@ -98,11 +98,12 @@ public sealed class BSLinksetCompound : BSLinkset
98 // Schedule a refresh to happen after all the other taint processing. 98 // Schedule a refresh to happen after all the other taint processing.
99 private void ScheduleRebuild(BSPhysObject requestor) 99 private void ScheduleRebuild(BSPhysObject requestor)
100 { 100 {
101 DetailLog("{0},BSLinksetCompound.ScheduleRebuild,,rebuilding={1}", 101 DetailLog("{0},BSLinksetCompound.ScheduleRebuild,,rebuilding={1},hasChildren={2}",
102 requestor.LocalID, Rebuilding); 102 requestor.LocalID, Rebuilding, HasAnyChildren);
103 // 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.
104 // If already rebuilding, don't request another rebuild. 104 // If already rebuilding, don't request another rebuild.
105 if (!Rebuilding) 105 // If a linkset with just a root prim (simple non-linked prim) don't bother rebuilding.
106 if (!Rebuilding && HasAnyChildren)
106 { 107 {
107 PhysicsScene.PostTaintObject("BSLinksetCompound.ScheduleRebuild", LinksetRoot.LocalID, delegate() 108 PhysicsScene.PostTaintObject("BSLinksetCompound.ScheduleRebuild", LinksetRoot.LocalID, delegate()
108 { 109 {
@@ -112,8 +113,7 @@ public sealed class BSLinksetCompound : BSLinkset
112 } 113 }
113 } 114 }
114 115
115 // The object is going dynamic (physical). Do any setup necessary 116 // The object is going dynamic (physical). Do any setup necessary for a dynamic linkset.
116 // for a dynamic linkset.
117 // Only the state of the passed object can be modified. The rest of the linkset 117 // Only the state of the passed object can be modified. The rest of the linkset
118 // has not yet been fully constructed. 118 // has not yet been fully constructed.
119 // Return 'true' if any properties updated on the passed object. 119 // Return 'true' if any properties updated on the passed object.
@@ -124,7 +124,7 @@ public sealed class BSLinksetCompound : BSLinkset
124 DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child)); 124 DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child));
125 if (IsRoot(child)) 125 if (IsRoot(child))
126 { 126 {
127 // The root is going dynamic. Make sure mass is properly set. 127 // The root is going dynamic. Rebuild the linkset so parts and mass get computed properly.
128 ScheduleRebuild(LinksetRoot); 128 ScheduleRebuild(LinksetRoot);
129 } 129 }
130 else 130 else
@@ -378,7 +378,7 @@ public sealed class BSLinksetCompound : BSLinkset
378 }); 378 });
379 379
380 // 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.
381 LinksetMass = LinksetMass; 381 LinksetMass = ComputeLinksetMass();
382 LinksetRoot.UpdatePhysicalMassProperties(LinksetMass, true); 382 LinksetRoot.UpdatePhysicalMassProperties(LinksetMass, true);
383 } 383 }
384 finally 384 finally