diff options
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp index 47cd4ff8da5..3b49607ff1b 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp @@ -338,6 +338,7 @@ m_enableSatCollisionDetection(false), m_solver(NULL), m_ownPairCache(NULL), m_filterCallback(NULL), +m_ghostPairCallback(NULL), m_ownDispatcher(NULL), m_scalingPropagated(false) { @@ -369,8 +370,9 @@ m_scalingPropagated(false) } m_filterCallback = new CcdOverlapFilterCallBack(this); + m_ghostPairCallback = new btGhostPairCallback(); m_broadphase->getOverlappingPairCache()->setOverlapFilterCallback(m_filterCallback); - m_broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback()); + m_broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(m_ghostPairCallback); setSolverType(1);//issues with quickstep and memory allocations // m_dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,m_broadphase,m_solver,m_collisionConfiguration); @@ -1886,6 +1888,9 @@ CcdPhysicsEnvironment::~CcdPhysicsEnvironment() if (NULL != m_filterCallback) delete m_filterCallback; + if (NULL != m_ghostPairCallback) + delete m_ghostPairCallback; + if (NULL != m_collisionConfiguration) delete m_collisionConfiguration; |