aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_damage_bad_boy.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_damage_bad_boy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ft_damage_bad_boy.c b/src/ft_damage_bad_boy.c
index 27a41ad..2d6bd58 100644
--- a/src/ft_damage_bad_boy.c
+++ b/src/ft_damage_bad_boy.c
@@ -42,7 +42,12 @@ void
cl->bad_boy[id].life -= FT_W_TWO_DANAGE_AMOUNT;
else if (cl->plist.handles_weapon == 4)
cl->bad_boy[id].life -= FT_W_THREE_DANAGE_AMOUNT;
- if (cl->bad_boy[id].does != 3)
+ if (cl->bad_boy[id].isdead == 0 &&
+ cl->bad_boy[id].life <= 0)
+ {
+ cl->sfx[13].sfx_play(cl->sfx);
+ cl->bad_boy[id].isdead = 1;
+ }
+ else if (cl->bad_boy[id].does != 3)
cl->sfx[14].sfx_play(cl->sfx);
- /* TODO: sfx enemy death */
}