From 006862cd0998804a979180c509d0e2da4afec948 Mon Sep 17 00:00:00 2001 From: salad Date: Mon, 23 Mar 2020 18:00:29 +0100 Subject: about to norm this mans whole career --- src/ft_shoot.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ft_shoot.c') diff --git a/src/ft_shoot.c b/src/ft_shoot.c index ab820e6..73a9617 100644 --- a/src/ft_shoot.c +++ b/src/ft_shoot.c @@ -12,6 +12,20 @@ #include #include +#include + +static void + ft_reset_sprites(t_cub *cl) +{ + uint16_t i; + uint16_t tmp; + + tmp = cl->mlist.sprite_var; + while(++i < tmp + 1) + { + ft_bzero(cl->sprites[i], sizeof(t_sprite)); + } +} static void ft_hitscan(t_cub *cl, uint16_t hit) @@ -35,6 +49,7 @@ static void { hit = 1; cl->mlist.map[cl->rlist.sqx][cl->rlist.sqy] = '0'; + ft_reset_sprites(cl); ft_get_sprite_spawn(cl); } else if (ft_ischarset("1", -- cgit v1.2.3