textures fixed
This commit is contained in:
parent
fab7758283
commit
ff7ba8760d
1 changed files with 4 additions and 4 deletions
8
render.c
8
render.c
|
@ -3,10 +3,10 @@
|
|||
/* ::: :::::::: */
|
||||
/* render.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: grobledo <grobledo@student.42.fr> +#+ +:+ +#+ */
|
||||
/* By: greg <greg@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/14 14:55:05 by greg #+# #+# */
|
||||
/* Updated: 2024/10/17 18:02:06 by grobledo ### ########.fr */
|
||||
/* Updated: 2024/10/18 02:02:32 by greg ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
@ -109,10 +109,10 @@ static void ft_init_texture(const double perpwalldist)
|
|||
if (g_ray.side == 1 && g_ray.dir.y >= 0)
|
||||
g_tex.tex_dir = 3;
|
||||
if (g_ray.side == 0)
|
||||
g_ray.wallx = g_player.pos.y + perpwalldist \
|
||||
g_ray.wallx = g_map.player.pos.y + perpwalldist \
|
||||
* g_ray.dir.y;
|
||||
else
|
||||
g_ray.wallx = g_player.pos.x + perpwalldist \
|
||||
g_ray.wallx = g_map.player.pos.x + perpwalldist \
|
||||
* g_ray.dir.x;
|
||||
g_ray.wallx -= floor((g_ray.wallx));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue