aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ft_draw_handweap.c2
-rw-r--r--src/ft_find_item.c2
2 files changed, 3 insertions, 1 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++;
}
diff --git a/src/ft_find_item.c b/src/ft_find_item.c
index 1c3e9a0..7332e19 100644
--- a/src/ft_find_item.c
+++ b/src/ft_find_item.c
@@ -41,7 +41,7 @@ static void
cl->weaps[weap_id][0].s_pos_x = 0;
cl->weaps[weap_id][0].s_pos_y = 0;
pl->has_weapon[weap_id] = 1;
- pl->handles_weapon = weap_id;
+ pl->handles_weapon = (weap_id == 1) ? (2) : (weap_id);
/* TODO: ft_sfx_weapon(3) */
}
}