aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_sprite_extra.c
diff options
context:
space:
mode:
authorsalad <salad@saladesk.desktop>2020-03-25 15:44:53 +0100
committersalad <salad@saladesk.desktop>2020-03-25 15:44:53 +0100
commite9458c5d50f43a66d575478a0cbc14d8f6e42baa (patch)
treea3eab40227257544ab7a9e669f635e29c7549b2f /src/ft_draw_sprite_extra.c
parentfuck fuck fuck (diff)
download42-cub3d-e9458c5d50f43a66d575478a0cbc14d8f6e42baa.tar.gz
42-cub3d-e9458c5d50f43a66d575478a0cbc14d8f6e42baa.tar.bz2
42-cub3d-e9458c5d50f43a66d575478a0cbc14d8f6e42baa.tar.xz
42-cub3d-e9458c5d50f43a66d575478a0cbc14d8f6e42baa.tar.zst
42-cub3d-e9458c5d50f43a66d575478a0cbc14d8f6e42baa.zip
what the fuck les amis
Diffstat (limited to 'src/ft_draw_sprite_extra.c')
-rw-r--r--src/ft_draw_sprite_extra.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ft_draw_sprite_extra.c b/src/ft_draw_sprite_extra.c
index 323906a..6503980 100644
--- a/src/ft_draw_sprite_extra.c
+++ b/src/ft_draw_sprite_extra.c
@@ -61,8 +61,8 @@ void
{
while (i < cl->mlist.sprite_nbr[j])
{
- sprite = cl->sprites[j][cl->mlist.sprite_order[j][i]];
- sprite.current_sprite = (j == 0) ? 4 : j + 7;
+ sprite = cl->sprites[cl->mlist.st_o[j]][cl->mlist.sprite_order[cl->mlist.st_o[j]][i]];
+ sprite.current_sprite = (cl->mlist.st_o[j] == 0) ? 4 : cl->mlist.st_o[j] + 7;
sprite.spritey = sprite.s_pos_x - (cl->plist.pos_x - 0.5);
sprite.spritex = sprite.s_pos_y - (cl->plist.pos_y - 0.5);
ft_init_sprite(cl, &sprite);