summaryrefslogtreecommitdiff
path: root/src/throwables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/throwables.c')
-rw-r--r--src/throwables.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/throwables.c b/src/throwables.c
index c18d410..f874bab 100644
--- a/src/throwables.c
+++ b/src/throwables.c
@@ -91,7 +91,10 @@ void explode_grenade(throwable t) {
if (dist_between_grenade_and_zombie > max_explosion_range) continue;
float damage_multiplier = 1.0f - (dist_between_grenade_and_zombie / max_explosion_range);
- hit_zombie(i, t.damage*damage_multiplier);
+ if (hit_zombie(i, t.damage*damage_multiplier)) {
+ player* p = get_player_by_id(t.player_id);
+ if (p) p->kills++;
+ }
}
}
}