diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 18:48:21 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-23 18:48:21 +0100 |
commit | 093e84b76c597015e89dddae8e51faae16feaf62 (patch) | |
tree | 66587b79153af48fb2aa8729ba8ca2c8d2d011e1 /src/ft_extra_keys.c | |
parent | Fixed sprite shadows (diff) | |
parent | Gonna merge (diff) | |
download | 42-cub3d-093e84b76c597015e89dddae8e51faae16feaf62.tar.gz 42-cub3d-093e84b76c597015e89dddae8e51faae16feaf62.tar.bz2 42-cub3d-093e84b76c597015e89dddae8e51faae16feaf62.tar.xz 42-cub3d-093e84b76c597015e89dddae8e51faae16feaf62.tar.zst 42-cub3d-093e84b76c597015e89dddae8e51faae16feaf62.zip |
Merge branch 'hitscan'
Diffstat (limited to 'src/ft_extra_keys.c')
-rw-r--r-- | src/ft_extra_keys.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c index 0ccf3fc..f8a6db8 100644 --- a/src/ft_extra_keys.c +++ b/src/ft_extra_keys.c @@ -12,8 +12,10 @@ #include <cub3d.h> #include <stdint.h> +#include <stdio.h> #include <math.h> #include <time.h> +#include <libft.h> #include <pthread.h> int @@ -82,6 +84,7 @@ int clist->plist.ammo[w_id] -= w_id; clist->sfx[clist->plist.handles_weapon + 7].sfx_play(clist->sfx); clist->plist.fire = 1; + ft_shoot(clist, clist->wlist.x_size / 2); return (0); } else if (clist->plist.fire == 0 && clist->plist.ammo[w_id] <= 0) |