diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-25 21:23:55 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-25 21:23:55 +0000 |
commit | 67325a0676006f27048debb55926a0ac9abb74ac (patch) | |
tree | 74042290cd3e9e78622ecae7c4cb1c4b722c74d3 /src/core | |
parent | d8be908233fd7b85492d7a9e87f07bb207173990 (diff) |
Enable collision detection on projectiles.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/physics.cc | 4 |
1 files 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<EntityDynamic *>(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<EntityDynamic *>(entity1)->collision(entity0); } |