aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_suffer_animation.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 20:25:54 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-19 20:25:54 +0100
commit5798c414690561950b53a3c9f9478891e75ec91f (patch)
treec068cea671eb4c80fefbebcee35460481afe8e5f /src/ft_suffer_animation.c
parentNow making second weapon (diff)
download42-cub3d-5798c414690561950b53a3c9f9478891e75ec91f.tar.gz
42-cub3d-5798c414690561950b53a3c9f9478891e75ec91f.tar.bz2
42-cub3d-5798c414690561950b53a3c9f9478891e75ec91f.tar.xz
42-cub3d-5798c414690561950b53a3c9f9478891e75ec91f.tar.zst
42-cub3d-5798c414690561950b53a3c9f9478891e75ec91f.zip
New images, that'll do the trick
Diffstat (limited to 'src/ft_suffer_animation.c')
-rw-r--r--src/ft_suffer_animation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ft_suffer_animation.c b/src/ft_suffer_animation.c
index 7229769..9ee7882 100644
--- a/src/ft_suffer_animation.c
+++ b/src/ft_suffer_animation.c
@@ -39,6 +39,7 @@ void
cl->plist.life -= FT_TRAP_DAMAGE_AMOUNT;
if (cl->plist.life <= 0)
{
+ cl->isdead = 1;
ft_sfx_death(cl);
ft_death_screen(cl);
}
@@ -74,10 +75,14 @@ void
cl->plist.life -= FT_TRAP_DAMAGE_AMOUNT;
if (cl->plist.life <= 0)
{
+ cl->isdead = 1;
ft_sfx_death(cl);
ft_death_screen(cl);
}
else
+ {
ft_sfx_trap(cl);
+ ft_sfx_pain(cl);
+ }
cl->doicast = 0;
}