From c716f84884e067bb7baf7a89eb015d9b8f2b0ca2 Mon Sep 17 00:00:00 2001 From: Steve Date: Sat, 9 Apr 2016 13:23:54 +0100 Subject: [PATCH] Allow bullets to still hit immortal entities, but not inflict any real damage. --- src/battle/bullets.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/battle/bullets.c b/src/battle/bullets.c index 3be3712..acc7f9c 100644 --- a/src/battle/bullets.c +++ b/src/battle/bullets.c @@ -182,11 +182,13 @@ static void checkCollisions(Bullet *b) battle.stats[STAT_ROCKETS_HIT]++; } } - - if (!(e->flags & EF_IMMORTAL)) + + if (e->flags & EF_IMMORTAL) { - damageFighter(e, b->damage, b->flags); + b->damage = 0; } + + damageFighter(e, b->damage, b->flags); b->life = 0; b->damage = 0;