From af3d4799702da402d224d2d22697b30790e1639d Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 2 Apr 2020 14:38:20 +0200 Subject: Correct ray_pos --- src/ft_detect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ft_detect.c') diff --git a/src/ft_detect.c b/src/ft_detect.c index a944a0f..c7bdcbb 100644 --- a/src/ft_detect.c +++ b/src/ft_detect.c @@ -23,14 +23,14 @@ void if (cl->rlist.x_ray_dir < 0) { cl->mlist.y_step = -1; - cl->rlist.y_side_dist = (cl->rlist.y_ray_pos - + cl->rlist.y_side_dist = (cl->rlist.x_ray_pos - cl->rlist.sqx) * cl->rlist.y_delta_dist; } else { cl->mlist.y_step = 1; cl->rlist.y_side_dist = (cl->rlist.sqx + 1.0 - - cl->rlist.y_ray_pos) * cl->rlist.y_delta_dist; + cl->rlist.x_ray_pos) * cl->rlist.y_delta_dist; } } @@ -43,14 +43,14 @@ void if (cl->rlist.y_ray_dir < 0) { cl->mlist.x_step = -1; - cl->rlist.x_side_dist = (cl->rlist.x_ray_pos - + cl->rlist.x_side_dist = (cl->rlist.y_ray_pos - cl->rlist.sqy) * cl->rlist.x_delta_dist; } else { cl->mlist.x_step = 1; cl->rlist.x_side_dist = (cl->rlist.sqy + 1.0 - - cl->rlist.x_ray_pos) * cl->rlist.x_delta_dist; + cl->rlist.y_ray_pos) * cl->rlist.x_delta_dist; } } -- cgit v1.2.3