diff options
author | Robert Adams | 2012-12-17 13:22:04 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-17 13:22:04 -0800 |
commit | 11532a4390ce3054f5a6798b4bf8dcf39d002e77 (patch) | |
tree | 020311696b99bf9d4f143397efc4fadf039075e8 /OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | |
parent | BulletSim: fix vehicles being shot in the air at border crossings because of ... (diff) | |
download | opensim-SC_OLD-11532a4390ce3054f5a6798b4bf8dcf39d002e77.zip opensim-SC_OLD-11532a4390ce3054f5a6798b4bf8dcf39d002e77.tar.gz opensim-SC_OLD-11532a4390ce3054f5a6798b4bf8dcf39d002e77.tar.bz2 opensim-SC_OLD-11532a4390ce3054f5a6798b4bf8dcf39d002e77.tar.xz |
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.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 14 |
1 files changed, 7 insertions, 7 deletions
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 | |||
94 | } | 94 | } |
95 | 95 | ||
96 | // Schedule a refresh to happen after all the other taint processing. | 96 | // Schedule a refresh to happen after all the other taint processing. |
97 | private void ScheduleRebuild() | 97 | private void ScheduleRebuild(BSPhysObject requestor) |
98 | { | 98 | { |
99 | DetailLog("{0},BSLinksetCompound.Refresh,schedulingRefresh,rebuilding={1}", | 99 | DetailLog("{0},BSLinksetCompound.Refresh,schedulingRefresh,rebuilding={1}", |
100 | LinksetRoot.LocalID, Rebuilding); | 100 | requestor.LocalID, Rebuilding); |
101 | // When rebuilding, it is possible to set properties that would normally require a rebuild. | 101 | // When rebuilding, it is possible to set properties that would normally require a rebuild. |
102 | // If already rebuilding, don't request another rebuild. | 102 | // If already rebuilding, don't request another rebuild. |
103 | if (!Rebuilding) | 103 | if (!Rebuilding) |
@@ -124,7 +124,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
124 | { | 124 | { |
125 | // The root is going dynamic. Make sure mass is properly set. | 125 | // The root is going dynamic. Make sure mass is properly set. |
126 | m_mass = ComputeLinksetMass(); | 126 | m_mass = ComputeLinksetMass(); |
127 | ScheduleRebuild(); | 127 | ScheduleRebuild(LinksetRoot); |
128 | } | 128 | } |
129 | else | 129 | else |
130 | { | 130 | { |
@@ -153,7 +153,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
153 | DetailLog("{0},BSLinksetCompound.MakeStatic,call,IsRoot={1}", child.LocalID, IsRoot(child)); | 153 | DetailLog("{0},BSLinksetCompound.MakeStatic,call,IsRoot={1}", child.LocalID, IsRoot(child)); |
154 | if (IsRoot(child)) | 154 | if (IsRoot(child)) |
155 | { | 155 | { |
156 | ScheduleRebuild(); | 156 | ScheduleRebuild(LinksetRoot); |
157 | } | 157 | } |
158 | else | 158 | else |
159 | { | 159 | { |
@@ -182,7 +182,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
182 | && PhysicsScene.TerrainManager.IsWithinKnownTerrain(LinksetRoot.RawPosition)) | 182 | && PhysicsScene.TerrainManager.IsWithinKnownTerrain(LinksetRoot.RawPosition)) |
183 | { | 183 | { |
184 | updated.LinksetInfo = null; | 184 | updated.LinksetInfo = null; |
185 | ScheduleRebuild(); | 185 | ScheduleRebuild(updated); |
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
@@ -266,7 +266,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
266 | DetailLog("{0},BSLinksetCompound.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); | 266 | DetailLog("{0},BSLinksetCompound.AddChildToLinkset,call,child={1}", LinksetRoot.LocalID, child.LocalID); |
267 | 267 | ||
268 | // Rebuild the compound shape with the new child shape included | 268 | // Rebuild the compound shape with the new child shape included |
269 | ScheduleRebuild(); | 269 | ScheduleRebuild(child); |
270 | } | 270 | } |
271 | return; | 271 | return; |
272 | } | 272 | } |
@@ -294,7 +294,7 @@ public sealed class BSLinksetCompound : BSLinkset | |||
294 | else | 294 | else |
295 | { | 295 | { |
296 | // Rebuild the compound shape with the child removed | 296 | // Rebuild the compound shape with the child removed |
297 | ScheduleRebuild(); | 297 | ScheduleRebuild(child); |
298 | } | 298 | } |
299 | } | 299 | } |
300 | return; | 300 | return; |