aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_draw_verline.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-08 18:35:05 +0100
committerRudy Bousset <rbousset@z2r4p1.le-101.fr>2020-03-08 18:35:05 +0100
commitbd93fcfe2968be72114c8b7a2a2b76b27a071925 (patch)
treefe1d85e4b6fbc0791b679aaf49c02583db8e3dfc /src/ft_draw_verline.c
parentWe close (diff)
download42-cub3d-bd93fcfe2968be72114c8b7a2a2b76b27a071925.tar.gz
42-cub3d-bd93fcfe2968be72114c8b7a2a2b76b27a071925.tar.bz2
42-cub3d-bd93fcfe2968be72114c8b7a2a2b76b27a071925.tar.xz
42-cub3d-bd93fcfe2968be72114c8b7a2a2b76b27a071925.tar.zst
42-cub3d-bd93fcfe2968be72114c8b7a2a2b76b27a071925.zip
Jimi Hendrix would be proud
Diffstat (limited to '')
-rw-r--r--src/ft_draw_verline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ft_draw_verline.c b/src/ft_draw_verline.c
index 8e71457..5368c4e 100644
--- a/src/ft_draw_verline.c
+++ b/src/ft_draw_verline.c
@@ -43,7 +43,7 @@ static void
{
curr_dist = cl->wlist.y_size / (2.0 * y - cl->wlist.y_size);
weight = (curr_dist - dist_player)
- / (cl->rlist.wall_dist - dist_player);
+ / (cl->rlist.perp_wall_dist - dist_player);
curr_floor_x = weight * cl->rlist.floor_x_wall
+ (1.0 - weight) * cl->plist.pos_x;
curr_floor_y = weight * cl->rlist.floor_y_wall