mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 19:10:49 +02:00
cleanups
This commit is contained in:
parent
8278f52a79
commit
e14b4c6ad4
1 changed files with 1 additions and 18 deletions
|
@ -467,16 +467,6 @@ void PhysicsEngine::computeCollisionEvents() {
|
||||||
if (type == CONTACT_EVENT_TYPE_END) {
|
if (type == CONTACT_EVENT_TYPE_END) {
|
||||||
ContactMap::iterator iterToDelete = contactItr;
|
ContactMap::iterator iterToDelete = contactItr;
|
||||||
++contactItr;
|
++contactItr;
|
||||||
|
|
||||||
// const ContactKey& contactKey = (*iterToDelete).first;
|
|
||||||
// const ObjectMotionState* objectMotionStateA = static_cast<ObjectMotionState*>(contactKey._a);
|
|
||||||
// const ObjectMotionState* objectMotionStateB = static_cast<ObjectMotionState*>(contactKey._b);
|
|
||||||
// const btCollisionObject* objectA =
|
|
||||||
// objectMotionStateA ? static_cast<const btCollisionObject*>(objectMotionStateA->getRigidBody()) : NULL;
|
|
||||||
// const btCollisionObject* objectB =
|
|
||||||
// objectMotionStateB ? static_cast<const btCollisionObject*>(objectMotionStateB->getRigidBody()) : NULL;
|
|
||||||
// doOwnershipInfection(objectA, objectB);
|
|
||||||
|
|
||||||
_contactMap.erase(iterToDelete);
|
_contactMap.erase(iterToDelete);
|
||||||
} else {
|
} else {
|
||||||
++contactItr;
|
++contactItr;
|
||||||
|
@ -600,17 +590,10 @@ void PhysicsEngine::removeObjectFromBullet(ObjectMotionState* motionState) {
|
||||||
assert(motionState);
|
assert(motionState);
|
||||||
btRigidBody* body = motionState->getRigidBody();
|
btRigidBody* body = motionState->getRigidBody();
|
||||||
|
|
||||||
// activate this before deleting it so that anything resting on it will begin to fall.
|
// wake up anything touching this object
|
||||||
//
|
|
||||||
// body->activate();
|
|
||||||
//
|
|
||||||
// motionState->setShouldClaimSimulationOwnership(true);
|
|
||||||
// computeCollisionEvents();
|
|
||||||
//
|
|
||||||
EntityItem* entityItem = motionState ? motionState->getEntity() : NULL;
|
EntityItem* entityItem = motionState ? motionState->getEntity() : NULL;
|
||||||
bump(entityItem);
|
bump(entityItem);
|
||||||
|
|
||||||
|
|
||||||
if (body) {
|
if (body) {
|
||||||
const btCollisionShape* shape = body->getCollisionShape();
|
const btCollisionShape* shape = body->getCollisionShape();
|
||||||
_dynamicsWorld->removeRigidBody(body);
|
_dynamicsWorld->removeRigidBody(body);
|
||||||
|
|
Loading…
Reference in a new issue