diff options
author | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-03-12 20:36:46 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p2.le-101.fr> | 2020-03-12 20:36:46 +0100 |
commit | aae2f9e42336371e104c153315d52e3aaede1d58 (patch) | |
tree | 17ce9fb0b3878bb00e3fadf5962510d9ccb8c2b4 | |
parent | good (diff) | |
download | 42-cub3d-aae2f9e42336371e104c153315d52e3aaede1d58.tar.gz 42-cub3d-aae2f9e42336371e104c153315d52e3aaede1d58.tar.bz2 42-cub3d-aae2f9e42336371e104c153315d52e3aaede1d58.tar.xz 42-cub3d-aae2f9e42336371e104c153315d52e3aaede1d58.tar.zst 42-cub3d-aae2f9e42336371e104c153315d52e3aaede1d58.zip |
Secured traps
-rw-r--r-- | inc/cub3d_defines.h | 1 | ||||
-rw-r--r-- | src/ft_check_missing.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/inc/cub3d_defines.h b/inc/cub3d_defines.h index b9a82c7..12c8580 100644 --- a/inc/cub3d_defines.h +++ b/inc/cub3d_defines.h @@ -186,6 +186,7 @@ enum # define FT_ERR_MISS_FLOOR_C "floor color" # define FT_ERR_MISS_CEIL_C "ceiling color" # define FT_ERR_MISS_PLAYER_SPAWN "player spawn" +# define FT_ERR_MISS_TRAP "traps" /* ** ====== OTHER ====== diff --git a/src/ft_check_missing.c b/src/ft_check_missing.c index 80edf83..51c0c23 100644 --- a/src/ft_check_missing.c +++ b/src/ft_check_missing.c @@ -44,6 +44,8 @@ static int return (ft_missing_error(FT_ERR_MISS_NLVL, clist)); else if (clist->mlist.isnlvl && !clist->mlist.nlevel_path[0]) return (ft_missing_error(FT_ERR_MISS_NLVL_PATH, clist)); + if (clist->mlist.istraps && !clist->mlist.traps_path[0]) + return (ft_missing_error(FT_ERR_MISS_TRAP, clist)); return (0); } |