From 33569a563ba9b1aa3977688754796464f3bc168b Mon Sep 17 00:00:00 2001 From: yesimzaim Date: Tue, 6 Feb 2024 17:14:58 +0100 Subject: [PATCH] fixed overflow here as well --- src/game/player.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/player.c b/src/game/player.c index 4b0db79..aa80741 100644 --- a/src/game/player.c +++ b/src/game/player.c @@ -115,8 +115,8 @@ void player_raycast(t_player *p) ray_start = vec2d_add(p->direction, vec2d_scalar_product(p->cam_plane, camera_x)); p->rays[col] = raycaster_cast(p->position, ray_start, bound_check, p->meta); // printf("wall x: %f\n", p->rays[col].wall_x); - col++; p->z_buffer[col] = p->rays[col].length; + col++; } sprite_calculate(p);