Browse Source

fix: cleaner doors

master
narnaud 3 years ago
parent
commit
99c5b2376a
  1. 4
      sources/render.c

4
sources/render.c

@ -6,7 +6,7 @@
/* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */ /* By: narnaud <narnaud@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2022/05/31 09:33:02 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]]; mapVal = env->map[rc.cell[1]][rc.cell[0]];
if (mapVal > '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; rc.tex = 4;
else if (mapVal == '1') else if (mapVal == '1')
rc.tex = 3 - side * 2 - (rc.step[side] + 1) / 2; rc.tex = 3 - side * 2 - (rc.step[side] + 1) / 2;

Loading…
Cancel
Save