Improved handling of bullet user pointers, which should fix the problem

of rockets not exploding when hitting the track anymore. But there is
still a bug with homing missiles, which still don't explode :(


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1425 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2008-01-30 05:30:10 +00:00
parent b75c9ec869
commit c3d3f3ab19
9 changed files with 82 additions and 107 deletions

View File

@@ -58,7 +58,8 @@ void TriangleMesh::createBody(btCollisionObject::CollisionFlags flags)
m_body=new btRigidBody(0.0f, m_motion_state, m_collision_shape);
world->getPhysics()->addBody(m_body);
m_body->setUserPointer(this);
m_user_pointer.set(UserPointer::UP_TRACK, this);
m_body->setUserPointer(&m_user_pointer);
m_body->setCollisionFlags(m_body->getCollisionFlags() |
flags |
btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);