From 6463914b0dc8136c453a1c163dd98f39e55e1c21 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 19 Mar 2020 19:04:46 +0100 Subject: Decent tier --- src/ft_draw_handweap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ft_draw_handweap.c') diff --git a/src/ft_draw_handweap.c b/src/ft_draw_handweap.c index ae756e8..cdc5f5a 100644 --- a/src/ft_draw_handweap.c +++ b/src/ft_draw_handweap.c @@ -27,16 +27,17 @@ static void cl->tweap[w_id].img_w * cl->tweap[w_id].tex_y + 2); } -#include void ft_draw_handweap(t_cub *cl) { - const int8_t w_id = cl->plist.handles_weapon; int32_t x_ratio; int32_t y_ratio; int16_t x; int16_t y; + int8_t w_id; + w_id = cl->plist.handles_weapon; + w_id += (cl->plist.fire == 1) ? (1) : 0; x_ratio = (int32_t)((cl->tweap[w_id].img_w << 16) / cl->wlist.x_size) + 1; y_ratio = (int32_t)((cl->tweap[w_id].img_h << 16) / cl->wlist.y_size) + 1; y = 0; -- cgit v1.2.3