diff options
author | Robert Adams | 2012-09-27 08:23:29 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-27 22:01:52 -0700 |
commit | f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b (patch) | |
tree | 3d355254a7bcb8c447fbfef901784af7062763d4 /OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs | |
parent | BulletSim: Terrain sets proper collision flags on creation. (diff) | |
download | opensim-SC-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.zip opensim-SC-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.gz opensim-SC-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.bz2 opensim-SC-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.xz |
BulletSim: Fix linkset crash. Caused by the different body and shape
pointers at runtime and at taint-time. Now passes the body into the
taint.
Vehicles zero inertia when active to eliminate Bullet's contribution
to vehicle motion.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs b/OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs index ff271fe..39a3421 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BS6DofConstraint.cs | |||
@@ -58,10 +58,22 @@ public class BS6DofConstraint : BSConstraint | |||
58 | m_world = world; | 58 | m_world = world; |
59 | m_body1 = obj1; | 59 | m_body1 = obj1; |
60 | m_body2 = obj2; | 60 | m_body2 = obj2; |
61 | m_constraint = new BulletConstraint( | 61 | if (obj1.ptr == IntPtr.Zero || obj2.ptr == IntPtr.Zero) |
62 | BulletSimAPI.Create6DofConstraintToPoint2(m_world.ptr, m_body1.ptr, m_body2.ptr, | 62 | { |
63 | joinPoint, | 63 | world.scene.DetailLog("{0},BS6DOFConstraint,badBodyPtr,wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}", |
64 | useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | 64 | "[BULLETSIM 6DOF CONSTRAINT]", world.worldID, |
65 | obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X")); | ||
66 | world.scene.Logger.ErrorFormat("{0} Attempt to build 6DOF constraint with missing bodies: wID={1}, rID={2}, rBody={3}, cID={4}, cBody={5}", | ||
67 | "[BULLETSIM 6DOF CONSTRAINT]", world.worldID, | ||
68 | obj1.ID, obj1.ptr.ToString("X"), obj2.ID, obj2.ptr.ToString("X")); | ||
69 | } | ||
70 | else | ||
71 | { | ||
72 | m_constraint = new BulletConstraint( | ||
73 | BulletSimAPI.Create6DofConstraintToPoint2(m_world.ptr, m_body1.ptr, m_body2.ptr, | ||
74 | joinPoint, | ||
75 | useLinearReferenceFrameA, disableCollisionsBetweenLinkedBodies)); | ||
76 | } | ||
65 | m_enabled = true; | 77 | m_enabled = true; |
66 | } | 78 | } |
67 | 79 | ||