diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 16:54:41 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-19 16:54:41 +0100 |
commit | f38224a19d0e14fbfaf6548e78e33a726b868e72 (patch) | |
tree | 49b8623de6a094748261e178b60a2eb0ee46ae8d /src | |
parent | Player can grab weapon (diff) | |
download | 42-cub3d-f38224a19d0e14fbfaf6548e78e33a726b868e72.tar.gz 42-cub3d-f38224a19d0e14fbfaf6548e78e33a726b868e72.tar.bz2 42-cub3d-f38224a19d0e14fbfaf6548e78e33a726b868e72.tar.xz 42-cub3d-f38224a19d0e14fbfaf6548e78e33a726b868e72.tar.zst 42-cub3d-f38224a19d0e14fbfaf6548e78e33a726b868e72.zip |
New file again
Diffstat (limited to '')
-rw-r--r-- | src/ft_draw_handweap.c | 14 | ||||
-rw-r--r-- | src/ft_raycasting.c | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/ft_draw_handweap.c b/src/ft_draw_handweap.c new file mode 100644 index 0000000..f433cb1 --- /dev/null +++ b/src/ft_draw_handweap.c @@ -0,0 +1,14 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_draw_handweap.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/22 20:02:47 by rbousset #+# #+# */ +/* Updated: 2020/02/22 20:02:48 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <cub3d.h> +#include <stdint.h> diff --git a/src/ft_raycasting.c b/src/ft_raycasting.c index aa33eb5..cbcda24 100644 --- a/src/ft_raycasting.c +++ b/src/ft_raycasting.c @@ -109,6 +109,8 @@ void ft_calc_heal(cl); ft_calc_trap(cl); ft_calc_weaps(cl); + if (cl->plist.handles_weapon > -1) + ft_draw_handweap(cl); ft_memdel((void*)&cl->rlist.wall_dist_tab); ft_memdel((void*)&cl->rlist.wall_bz); } |