aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_bad_boy_actions.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 14:29:18 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-31 14:29:18 +0200
commit137397e014be24d48ccc60e36af21ffc25229b77 (patch)
tree4cc7e8a39c7b92756efceea8ea155d5de29317f3 /src/ft_bad_boy_actions.c
parentNigga ain't gonna stop shootin me (diff)
download42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.gz
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.bz2
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.xz
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.tar.zst
42-cub3d-137397e014be24d48ccc60e36af21ffc25229b77.zip
Fixed that gangsta
Diffstat (limited to '')
-rw-r--r--src/ft_bad_boy_actions.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ft_bad_boy_actions.c b/src/ft_bad_boy_actions.c
index 3e961fb..c2324bd 100644
--- a/src/ft_bad_boy_actions.c
+++ b/src/ft_bad_boy_actions.c
@@ -62,6 +62,26 @@ void
}
void
+ ft_check_bad_boy_shoot(t_cub *cl)
+{
+ int8_t i;
+
+ i = 0;
+ while (i < cl->mlist.sprite_nbr[13])
+ {
+ if (cl->bad_boy[i].does == 2 && cl->bad_boy[i].sleep == 0)
+ {
+ cl->sfx[11].sfx_play(cl->sfx);
+ if (FT_OS == 1)
+ ft_macos_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl);
+ else
+ ft_linux_suffer_animation(FT_ENMY_DAMAGE_AMOUNT, cl);
+ }
+ i++;
+ }
+}
+
+void
ft_bb_fire(t_bad_boy *bl, t_sprite *sl, t_map *ml)
{
(void)sl;