aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite.c
diff options
context:
space:
mode:
authorsalaaad2 <arthudurant263@gmail.com>2020-03-25 14:40:34 +0100
committersalaaad2 <arthudurant263@gmail.com>2020-03-25 14:40:34 +0100
commit14db635d9afa8457e3dbd3563394e5a06f62d962 (patch)
tree5afb17c6f70ceac630d297be31892ee089cc7eb2 /src/ft_draw_sprite.c
parentOk (diff)
download42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.gz
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.bz2
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.xz
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.tar.zst
42-cub3d-14db635d9afa8457e3dbd3563394e5a06f62d962.zip
fuck fuck fuck
Diffstat (limited to '')
-rw-r--r--src/ft_draw_sprite.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ft_draw_sprite.c b/src/ft_draw_sprite.c
index b381957..5c0fe41 100644
--- a/src/ft_draw_sprite.c
+++ b/src/ft_draw_sprite.c
@@ -41,9 +41,9 @@ void
{
float dist_tab[8][4096];
- while (++jt <= cl->mlist.sprite_var)
+ while (++jt < cl->mlist.sprite_var)
{
- while (++it <= cl->mlist.sprite_nbr[jt])
+ while (++it < cl->mlist.sprite_nbr[jt])
{
dist_tab[jt][it] =
((cl->plist.pos_x - cl->sprites[jt][it].s_pos_x) *
@@ -62,6 +62,7 @@ void
ft_sort_sprites_norme(dist_tab[jt], &it, jt, cl);
it = -1;
}
+ ft_sort_s_t(cl, dist_tab);
}
static void