From 11532a4390ce3054f5a6798b4bf8dcf39d002e77 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 17 Dec 2012 13:22:04 -0800 Subject: BulletSim: fix vehicles going underground when unsat. Problem was that, when doing unsit, the order of operations on the prims and the vehicle is very chaotic and not in a good order so the root prim was being left physical and thus it fell for a bit. Also changed default of velocity scaling to be closer to the movement standard. --- OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 4d4f712..2a7b72c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs @@ -94,10 +94,10 @@ public sealed class BSLinksetCompound : BSLinkset } // Schedule a refresh to happen after all the other taint processing. - private void ScheduleRebuild() + private void ScheduleRebuild(BSPhysObject requestor) { DetailLog("{0},BSLinksetCompound.Refresh,schedulingRefresh,rebuilding={1}", - LinksetRoot.LocalID, Rebuilding); + requestor.LocalID, Rebuilding); // When rebuilding, it is possible to set properties that would normally require a rebuild. // If already rebuilding, don't request another rebuild. if (!Rebuilding) @@ -124,7 +124,7 @@ public sealed class BSLinksetCompound : BSLinkset { // The root is going dynamic. Make sure mass is properly set. m_mass = ComputeLinksetMass(); - ScheduleRebuild(); + ScheduleRebuild(LinksetRoot); } else { @@ -153,7 +153,7 @@ public sealed class BSLinksetCompound : BSLinkset DetailLog("{0},BSLinksetCompound.MakeStatic,call,IsRoot={1}", child.LocalID, IsRoot(child)); if (IsRoot(child)) { - ScheduleRebuild(); + ScheduleRebuild(LinksetRoot); } else { @@ -182,7 +182,7 @@ public sealed class BSLinksetCompound : BSLinkset && PhysicsScene.TerrainManager.IsWithinKnownTerrain(LinksetRoot.RawPosition)) { updated.LinksetInfo = null; - ScheduleRebuild(); + ScheduleRebuild(updated); } } @@ -266,7 +266,7 @@ public sealed class BSLinksetCompound : BSLinkset DetailLog("{0},BSLinksetCompound.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); // Rebuild the compound shape with the new child shape included - ScheduleRebuild(); + ScheduleRebuild(child); } return; } @@ -294,7 +294,7 @@ public sealed class BSLinksetCompound : BSLinkset else { // Rebuild the compound shape with the child removed - ScheduleRebuild(); + ScheduleRebuild(child); } } return; -- cgit v1.1