author | nireco |
Mon, 08 Dec 2008 16:30:13 +0000 | |
changeset 291 | 5d7221003b26 |
parent 290 | f8e69f493460 |
child 292 | d837bd7a0da3 |
src/Projectile.cc | file | annotate | diff | comparison | revisions |
--- a/src/Projectile.cc Mon Dec 08 16:23:30 2008 +0000 +++ b/src/Projectile.cc Mon Dec 08 16:30:13 2008 +0000 @@ -42,6 +42,11 @@ void Projectile::onCollision (Vector collisionPoint, PhysicsObject *other) { (void) other; + if(other->getType() == PLAYER) { + Player* pl = dynamic_cast<Player*>(other); + pl->takeDamage(12345); + } + if (collision_elasticity == 0) onDestroy(collisionPoint, true); }