diff --git a/src/physics/physics.cpp b/src/physics/physics.cpp index 092c74dc5..74db8c726 100644 --- a/src/physics/physics.cpp +++ b/src/physics/physics.cpp @@ -454,16 +454,16 @@ btScalar Physics::solveGroup(btCollisionObject** bodies, int numBodies, btPersistentManifold* contact_manifold = m_dynamics_world->getDispatcher()->getManifoldByIndexInternal(i); - btCollisionObject* objA = - static_cast(contact_manifold->getBody0()); - btCollisionObject* objB = - static_cast(contact_manifold->getBody1()); + const btCollisionObject* objA = + static_cast(contact_manifold->getBody0()); + const btCollisionObject* objB = + static_cast(contact_manifold->getBody1()); unsigned int num_contacts = contact_manifold->getNumContacts(); if(!num_contacts) continue; // no real collision - UserPointer *upA = (UserPointer*)(objA->getUserPointer()); - UserPointer *upB = (UserPointer*)(objB->getUserPointer()); + const UserPointer *upA = (UserPointer*)(objA->getUserPointer()); + const UserPointer *upB = (UserPointer*)(objB->getUserPointer()); if(!upA || !upB) continue;