summaryrefslogtreecommitdiff
path: root/games/glPortal/bullet286.patch
blob: 69e204a80b446a0aa4188b51f575b80ae08f20c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
commit 08df5951c9bbcf16234289eaef99c51e3f8bed13
Author: Henry Hirsch <henry@w3-net.de>
Date:   Tue Feb 28 21:08:04 2017 +0100

    Port uncollider to bullet 2.86

diff --git a/source/physics/Uncollider.cpp b/source/physics/Uncollider.cpp
index 99ffc79..8f60885 100644
--- a/source/physics/Uncollider.cpp
+++ b/source/physics/Uncollider.cpp
@@ -72,19 +72,24 @@ void Uncollider::nearCallback(btBroadphasePair &collisionPair,
 
   btCollisionObject *colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
   btCollisionObject *colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
-  
+
   if (dispatcher.needsCollision(colObj0, colObj1)) {
     btCollisionObjectWrapper obj0Wrap(0, colObj0->getCollisionShape(),
       colObj0, colObj0->getWorldTransform(), -1, -1);
     btCollisionObjectWrapper obj1Wrap(0, colObj1->getCollisionShape(),
       colObj1, colObj1->getWorldTransform(), -1, -1);
 
+    btManifoldResult contactPointResult(&obj0Wrap, &obj1Wrap);
+
     if (not collisionPair.m_algorithm) {
-      collisionPair.m_algorithm = dispatcher.findAlgorithm(&obj0Wrap, &obj1Wrap);
+
+      collisionPair.m_algorithm =
+        dispatcher.findAlgorithm(&obj0Wrap, &obj1Wrap,
+                                 contactPointResult.getPersistentManifold(),
+                                 ebtDispatcherQueryType::BT_CONTACT_POINT_ALGORITHMS);
     }
 
     if (collisionPair.m_algorithm) {
-      btManifoldResult contactPointResult(&obj0Wrap, &obj1Wrap);
       if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE) {
         collisionPair.m_algorithm->processCollision(&obj0Wrap, &obj1Wrap, dispatchInfo,
           &contactPointResult);