aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_handweap.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_draw_handweap.c5
1 files changed, 3 insertions, 2 deletions
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 <libft.h>
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;