oeps
This commit is contained in:
parent
14094ec232
commit
5a5d2cff5b
@ -6,7 +6,7 @@
|
||||
/* By: whaffman <whaffman@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* Created: 2025/05/02 11:58:09 by whaffman #+# #+# */
|
||||
/* Updated: 2025/05/02 20:26:34 by whaffman ######## odam.nl */
|
||||
/* Updated: 2025/05/02 20:29:40 by whaffman ######## odam.nl */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -116,7 +116,7 @@ t_render cast_ray(t_game *game, int x)
|
||||
pos = game->player->pos;
|
||||
perp_dist = DDA(ray_dir, pos, game->map);
|
||||
render.perp_dist = fabs(perp_dist);
|
||||
render.side = get_side(ray_dir);
|
||||
render.side = get_side(ray_dir, perp_dist);
|
||||
render.wall_x = (perp_dist > 0) * (pos.x + ray_dir.x * perp_dist)
|
||||
+ (perp_dist <= 0) * (pos.y + ray_dir.y * perp_dist);
|
||||
render.wall_x -= floor(render.wall_x);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user