diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-11 13:55:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-11 13:55:44 +0200 |
commit | c499f1475f1c37c6d83985320a9e98a3d2711a2b (patch) | |
tree | 8ceaa6bc1d5deb40b7c5fc998041ecd63ad122d9 /thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp | |
parent | f0bacf360dbb6ce3781356438b2fa7067250d27c (diff) | |
parent | 99acec63f175fecd7172c927263ed3787cb082d6 (diff) |
Merge pull request #29418 from AndreaCatania/upbul
Updated Bullet version to the actual bullet master commit
Diffstat (limited to 'thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp')
-rw-r--r-- | thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp b/thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp index 3d8ab9f520..73e3db1010 100644 --- a/thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp +++ b/thirdparty/bullet/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp @@ -18,7 +18,7 @@ subject to the following restrictions: 3. This notice may not be removed or altered from any source distribution. */ /* -Author: Francisco Len Nßjera +Author: Francisco Leon Najera Concave-Concave Collision */ @@ -590,14 +590,16 @@ void btGImpactCollisionAlgorithm::gimpact_vs_shape(const btCollisionObjectWrappe } btCollisionObjectWrapper ob0(body0Wrap, colshape0, body0Wrap->getCollisionObject(), body0Wrap->getWorldTransform(), m_part0, m_triface0); - const btCollisionObjectWrapper* prevObj0 = m_resultOut->getBody0Wrap(); + const btCollisionObjectWrapper* prevObj; if (m_resultOut->getBody0Wrap()->getCollisionObject() == ob0.getCollisionObject()) { + prevObj = m_resultOut->getBody0Wrap(); m_resultOut->setBody0Wrap(&ob0); } else { + prevObj = m_resultOut->getBody1Wrap(); m_resultOut->setBody1Wrap(&ob0); } @@ -610,7 +612,15 @@ void btGImpactCollisionAlgorithm::gimpact_vs_shape(const btCollisionObjectWrappe { shape_vs_shape_collision(&ob0, body1Wrap, colshape0, shape1); } - m_resultOut->setBody0Wrap(prevObj0); + + if (m_resultOut->getBody0Wrap()->getCollisionObject() == ob0.getCollisionObject()) + { + m_resultOut->setBody0Wrap(prevObj); + } + else + { + m_resultOut->setBody1Wrap(prevObj); + } } shape0->unlockChildShapes(); |