aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--inc/cub3d_structs.h1
-rw-r--r--src/ft_init_lists.c1
-rw-r--r--src/ft_key_loop.c3
-rw-r--r--src/ft_parse_map.c3
-rw-r--r--src/ft_suffer_animation.c2
5 files changed, 2 insertions, 8 deletions
diff --git a/inc/cub3d_structs.h b/inc/cub3d_structs.h
index 96ed172..70bb6fe 100644
--- a/inc/cub3d_structs.h
+++ b/inc/cub3d_structs.h
@@ -135,7 +135,6 @@ typedef struct s_player
float plane_x;
float plane_y;
int8_t life;
- uint8_t isdead;
} t_player;
typedef struct s_ray
diff --git a/src/ft_init_lists.c b/src/ft_init_lists.c
index af79b45..5726a5b 100644
--- a/src/ft_init_lists.c
+++ b/src/ft_init_lists.c
@@ -80,7 +80,6 @@ static int8_t
cl->rlist = ft_init_s_ray();
if (ft_init_sfx(&cl->sfx) < 0)
return (-1);
- cl->plist.isdead = 0;
cl->currlvl = 0;
cl->walltexgood = 0;
ft_init_funptr(cl);
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index dc3a65d..c16655e 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -83,7 +83,7 @@ int
{
cl->key_ptr[cl->key_input[i]](cl);
ft_collision(old_y, old_x, cl->key_input[i], cl);
- if (cl->mlist.isnlvl && !cl->plist.isdead)
+ if (cl->mlist.isnlvl)
{
if ((uint32_t)cl->plist.pos_x == cl->mlist.nlx &&
(uint32_t)cl->plist.pos_y == cl->mlist.nly)
@@ -95,7 +95,6 @@ int
}
i++;
}
- ft_printf("%hhu\n", cl->plist.isdead);
if (cl->key_input[0] != -1)
ft_draw_scene(cl);
return (0);
diff --git a/src/ft_parse_map.c b/src/ft_parse_map.c
index c5df30e..f1df73d 100644
--- a/src/ft_parse_map.c
+++ b/src/ft_parse_map.c
@@ -109,7 +109,6 @@ void
ft_get_nlvl_pos(&clist->mlist);
ft_check_missing(clist);
ft_set_minimap_scale(clist);
- if (!clist->plist.isdead)
- clist->currlvl += 1;
+ clist->currlvl += 1;
close(fd);
}
diff --git a/src/ft_suffer_animation.c b/src/ft_suffer_animation.c
index 6933f56..3d9100a 100644
--- a/src/ft_suffer_animation.c
+++ b/src/ft_suffer_animation.c
@@ -40,7 +40,6 @@ void
cl->plist.life -= 20;
if (cl->plist.life <= 0)
{
- cl->plist.isdead = 1;
ft_warp_level(cl->mlist.filename, cl);
ft_sfx_death(cl);
/* TODO death screen here */
@@ -74,7 +73,6 @@ void
cl->plist.life -= 20;
if (cl->plist.life <= 0)
{
- cl->plist.isdead = 1;
ft_warp_level(cl->mlist.filename, cl);
ft_sfx_death(cl);
/* TODO death screen here */