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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user