aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_handweap.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 18:13:42 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 18:13:42 +0100
commitbb495370849b7105a8da2384759c9a206557fcec (patch)
tree8a3cb79a265b084829024c9c84ed2eefe9741220 /src/ft_draw_handweap.c
parentOk resize (diff)
download42-cub3d-bb495370849b7105a8da2384759c9a206557fcec.tar.gz
42-cub3d-bb495370849b7105a8da2384759c9a206557fcec.tar.bz2
42-cub3d-bb495370849b7105a8da2384759c9a206557fcec.tar.xz
42-cub3d-bb495370849b7105a8da2384759c9a206557fcec.tar.zst
42-cub3d-bb495370849b7105a8da2384759c9a206557fcec.zip
That's pretty cool I'm not gonna lie
Diffstat (limited to 'src/ft_draw_handweap.c')
-rw-r--r--src/ft_draw_handweap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ft_draw_handweap.c b/src/ft_draw_handweap.c
index 241a804..1835f2a 100644
--- a/src/ft_draw_handweap.c
+++ b/src/ft_draw_handweap.c
@@ -48,6 +48,8 @@ void
while (x < (int16_t)cl->wlist.x_size)
{
cl->tweap[w_id].tex_x = ((x * x_ratio) >> 16);
+ if (cl->tweap[w_id].ptr[cl->tweap[w_id].tex_x * 4 + 4 *
+ cl->tweap[w_id].img_h * cl->tweap[w_id].tex_y])
ft_put_weapon_image(w_id, y, x, cl);
x++;
}