From 21295664507cca03068f9c2e9878603e2245f5af Mon Sep 17 00:00:00 2001 From: gugus Date: Mon, 28 Feb 2011 19:43:11 +0100 Subject: [PATCH] fix coc bug --- bullet/physic.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bullet/physic.cpp b/bullet/physic.cpp index 76dabce5d9..733216cc17 100644 --- a/bullet/physic.cpp +++ b/bullet/physic.cpp @@ -219,6 +219,13 @@ namespace Physic RigidBody* body = RigidBodyMap[name]; if(body != NULL) { + broadphase->getOverlappingPairCache()->removeOverlappingPairsContainingProxy(body->getBroadphaseProxy(),dispatcher); + std::map::iterator it = PhysicActorMap.begin(); + for(;it!=PhysicActorMap.end();it++) + { + it->second->internalGhostObject->getOverlappingPairCache()->removeOverlappingPairsContainingProxy(body->getBroadphaseProxy(),dispatcher); + it->second->externalGhostObject->getOverlappingPairCache()->removeOverlappingPairsContainingProxy(body->getBroadphaseProxy(),dispatcher); + } dynamicsWorld->removeRigidBody(RigidBodyMap[name]); } }