aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_check_missing_defines.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-04 17:39:46 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-04 17:39:46 +0200
commit6161b36ffd9cb5873c245951d97ea51c977fe9e6 (patch)
tree811da882466c25a1fd311c3aaf619f5dca46839b /src/ft_check_missing_defines.c
parentSelectable enemy (diff)
download42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.gz
42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.bz2
42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.xz
42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.tar.zst
42-cub3d-6161b36ffd9cb5873c245951d97ea51c977fe9e6.zip
Consitent heals
Diffstat (limited to 'src/ft_check_missing_defines.c')
-rw-r--r--src/ft_check_missing_defines.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ft_check_missing_defines.c b/src/ft_check_missing_defines.c
index 6c616b0..7994a8a 100644
--- a/src/ft_check_missing_defines.c
+++ b/src/ft_check_missing_defines.c
@@ -25,6 +25,18 @@ static int
if (ft_check_not_found(FT_CAP_AMMO_PATH) < 0 ||
ft_check_ext(FT_CAP_AMMO_PATH, ".xpm") < 0)
return (ft_missing_error(FT_ERR_MISS_A_CAPTION, clist));
+ if (clist->mlist.enemy == 1)
+ {
+ if (ft_check_not_found(FT_HEAL_PACK_PATH) < 0 ||
+ ft_check_ext(FT_HEAL_PACK_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_HEAL_PACK, clist));
+ }
+ else
+ {
+ if (ft_check_not_found(FT_HEAL_PACK_PATH) < 0 ||
+ ft_check_ext(FT_HEAL_PACK_PATH, ".xpm") < 0)
+ return (ft_missing_error(FT_ERR_MISS_HEAL_PACK, clist));
+ }
return (ft_check_missing_sfx(clist));
}