From 67325a0676006f27048debb55926a0ac9abb74ac Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 25 Nov 2012 21:23:55 +0000 Subject: Enable collision detection on projectiles. --- src/core/physics.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/physics.cc b/src/core/physics.cc index b1c8e0f..69c21f2 100644 --- a/src/core/physics.cc +++ b/src/core/physics.cc @@ -39,11 +39,11 @@ bool bullet_contact_added_callback(btManifoldPoint &cp, const btCollisionObjectW // FIXME there should probably be an entity flag indiciating wether or not it has a collision callback - if ((entity0->type() == Entity::Dynamic) || (entity0->type() == Entity::Controlable)) { + if ((entity0->type() == Entity::Dynamic) || (entity0->type() == Entity::Controlable) || (entity0->type() == Entity::Projectile)) { static_cast(entity0)->collision(entity1); } - if ((entity1->type() == Entity::Dynamic) || (entity1->type() == Entity::Controlable)) { + if ((entity1->type() == Entity::Dynamic) || (entity1->type() == Entity::Controlable) || (entity1->type() == Entity::Projectile)) { static_cast(entity1)->collision(entity0); } -- cgit v1.2.3