aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_pain.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 15:09:59 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-03-15 15:09:59 +0100
commit163bed0c8988ff020b746bf96dc01dd2058dc4f9 (patch)
tree724090f6319cc6d0336eb2a5b501bd032599d295 /src/ft_sfx_pain.c
parentok (diff)
download42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.gz
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.bz2
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.xz
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.tar.zst
42-cub3d-163bed0c8988ff020b746bf96dc01dd2058dc4f9.zip
Footsteps are bav
Diffstat (limited to 'src/ft_sfx_pain.c')
-rw-r--r--src/ft_sfx_pain.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/ft_sfx_pain.c b/src/ft_sfx_pain.c
index 962dcae..28bc95d 100644
--- a/src/ft_sfx_pain.c
+++ b/src/ft_sfx_pain.c
@@ -28,9 +28,7 @@ void
pthread_mutex_lock(&sfx->pain_mutex);
while (1)
{
- ref += 1;
- if (ref > 201)
- ref = 0;
+ ref = (ref > 201) ? (0) : (ref + 1);
if (ref % 2)
{
pthread_mutex_lock(&sfx->pain_mutex);