From 99c5b2376ad41260dff1f35084d9f1b780bf3ef8 Mon Sep 17 00:00:00 2001 From: narnaud Date: Tue, 7 Jun 2022 08:25:34 +0200 Subject: [PATCH] fix: cleaner doors --- sources/render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/render.c b/sources/render.c index aa588bc..29dfa0e 100644 --- a/sources/render.c +++ b/sources/render.c @@ -6,7 +6,7 @@ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/31 09:33:02 by narnaud #+# #+# */ -/* Updated: 2022/06/03 15:03:57 by narnaud ### ########.fr */ +/* Updated: 2022/06/07 08:22:49 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ @@ -109,7 +109,7 @@ void render_view(t_env* env) mapVal = env->map[rc.cell[1]][rc.cell[0]]; if (mapVal > '0') { - if (mapVal == '2' && (rc.sDist[abs(side + 1)] > 4 && rc.sDist[side] > 3)) + if (mapVal == '2' && vec_len((t_vec_d){rc.cell[0] - env->playerPos.x, rc.cell[1] - env->playerPos.y}) > 3) rc.tex = 4; else if (mapVal == '1') rc.tex = 3 - side * 2 - (rc.step[side] + 1) / 2;