aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-12-11 00:02:20 -0800
committerRobert Adams2012-12-11 00:02:20 -0800
commitebf30e7ba66446d7018346c12111d65a030d2786 (patch)
tree0e0c858d173927a5097d7c3702a59ae704ac54ea /OpenSim
parentBulletSim: comment out some chatty debug logging. Rearrange some code in BSDy... (diff)
downloadopensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.zip
opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.gz
opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.bz2
opensim-SC-ebf30e7ba66446d7018346c12111d65a030d2786.tar.xz
BulletSim: set mass for single prim linksets when going physical. This fixes single prim vehicles not working (the surf board now zooms).
Diffstat (limited to 'OpenSim')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
index fe5b5e3..d2abdb4 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs
@@ -110,12 +110,19 @@ public sealed class BSLinksetCompound : BSLinkset
110 { 110 {
111 bool ret = false; 111 bool ret = false;
112 DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child)); 112 DetailLog("{0},BSLinksetCompound.MakeDynamic,call,IsRoot={1}", child.LocalID, IsRoot(child));
113 if (!IsRoot(child)) 113 if (IsRoot(child))
114 {
115 // The root is going dynamic. Make sure mass is properly set.
116 m_mass = ComputeLinksetMass();
117 }
118 else
114 { 119 {
115 // The origional prims are removed from the world as the shape of the root compound 120 // The origional prims are removed from the world as the shape of the root compound
116 // shape takes over. 121 // shape takes over.
117 BulletSimAPI.AddToCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE); 122 BulletSimAPI.AddToCollisionFlags2(child.PhysBody.ptr, CollisionFlags.CF_NO_CONTACT_RESPONSE);
118 BulletSimAPI.ForceActivationState2(child.PhysBody.ptr, ActivationState.DISABLE_SIMULATION); 123 BulletSimAPI.ForceActivationState2(child.PhysBody.ptr, ActivationState.DISABLE_SIMULATION);
124 // We don't want collisions from the old linkset children.
125 BulletSimAPI.RemoveFromCollisionFlags2(child.PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
119 ret = true; 126 ret = true;
120 } 127 }
121 return ret; 128 return ret;