aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_textures.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:35:55 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:35:55 +0200
commit20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839 (patch)
treeafea14915414c45325b9f0e4d8f64ee35935d101 /src/ft_draw_textures.c
parentCorrect dir_x dir_y sqy sqx (diff)
download42-cub3d-20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839.tar.gz
42-cub3d-20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839.tar.bz2
42-cub3d-20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839.tar.xz
42-cub3d-20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839.tar.zst
42-cub3d-20e9cfd5bf432b0e68b4e2fd3b721f1fcea8c839.zip
Correct ray dir
Diffstat (limited to 'src/ft_draw_textures.c')
-rw-r--r--src/ft_draw_textures.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ft_draw_textures.c b/src/ft_draw_textures.c
index 0f8bc43..533564d 100644
--- a/src/ft_draw_textures.c
+++ b/src/ft_draw_textures.c
@@ -53,11 +53,11 @@ void
}
else
{
- if (clist->rlist.side == 0 && clist->rlist.x_ray_dir < 0)
+ if (clist->rlist.side == 0 && clist->rlist.y_ray_dir < 0)
clist->w_side = 1;
- else if (clist->rlist.side == 0 && clist->rlist.x_ray_dir > 0)
+ else if (clist->rlist.side == 0 && clist->rlist.y_ray_dir > 0)
clist->w_side = 0;
- else if (clist->rlist.side == 1 && clist->rlist.y_ray_dir > 0)
+ else if (clist->rlist.side == 1 && clist->rlist.x_ray_dir > 0)
clist->w_side = 3;
else
clist->w_side = 2;