aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ft_sfx_bb_death.c3
-rw-r--r--src/ft_sfx_bb_fire.c3
-rw-r--r--src/ft_sfx_bb_scream.c9
-rw-r--r--src/ft_sfx_death.c3
-rw-r--r--src/ft_sfx_footstep.c9
-rw-r--r--src/ft_sfx_heal.c3
-rw-r--r--src/ft_sfx_new_level.c3
-rw-r--r--src/ft_sfx_ooa.c3
-rw-r--r--src/ft_sfx_pain.c9
-rw-r--r--src/ft_sfx_trap.c3
-rw-r--r--src/ft_sfx_weapon_one.c3
-rw-r--r--src/ft_sfx_weapon_three.c3
-rw-r--r--src/ft_sfx_weapon_two.c3
-rw-r--r--src/ft_sfx_weapon_two_alt.c3
-rw-r--r--src/ft_warp_level.c1
15 files changed, 27 insertions, 34 deletions
diff --git a/src/ft_sfx_bb_death.c b/src/ft_sfx_bb_death.c
index 23a96d8..a7ca6dc 100644
--- a/src/ft_sfx_bb_death.c
+++ b/src/ft_sfx_bb_death.c
@@ -28,8 +28,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[13].mutex);
- if (system(sfx[13].cmd))
- pthread_exit(NULL);
+ system(sfx[13].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_bb_fire.c b/src/ft_sfx_bb_fire.c
index df89544..c6b00a1 100644
--- a/src/ft_sfx_bb_fire.c
+++ b/src/ft_sfx_bb_fire.c
@@ -28,8 +28,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[15].mutex);
- if (system(sfx[15].cmd))
- pthread_exit(NULL);
+ system(sfx[15].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_bb_scream.c b/src/ft_sfx_bb_scream.c
index 7c68c53..c586184 100644
--- a/src/ft_sfx_bb_scream.c
+++ b/src/ft_sfx_bb_scream.c
@@ -31,11 +31,12 @@ void
ref = (ref > 201) ? (0) : (ref + 1);
if (ref % 3)
{
- if (system(sfx[14].cmd))
- pthread_exit(NULL);
+ system(sfx[14].cmd);
+ }
+ else
+ {
+ system(sfx[14].cmd_alt);
}
- else if (system(sfx[14].cmd_alt))
- pthread_exit(NULL);
}
return (NULL);
}
diff --git a/src/ft_sfx_death.c b/src/ft_sfx_death.c
index 76a98cd..558ed09 100644
--- a/src/ft_sfx_death.c
+++ b/src/ft_sfx_death.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[0].mutex);
- if (system(sfx[0].cmd))
- pthread_exit(NULL);
+ system(sfx[0].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_footstep.c b/src/ft_sfx_footstep.c
index 628660b..d8367c9 100644
--- a/src/ft_sfx_footstep.c
+++ b/src/ft_sfx_footstep.c
@@ -31,11 +31,12 @@ void
pthread_mutex_lock(&sfx[1].mutex);
if (ref % 2)
{
- if (system(sfx[1].cmd))
- pthread_exit(NULL);
+ system(sfx[1].cmd);
+ }
+ else
+ {
+ system(sfx[1].cmd_alt);
}
- else if (system(sfx[1].cmd_alt))
- pthread_exit(NULL);
}
return (NULL);
}
diff --git a/src/ft_sfx_heal.c b/src/ft_sfx_heal.c
index b95fc2c..2a8135e 100644
--- a/src/ft_sfx_heal.c
+++ b/src/ft_sfx_heal.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[5].mutex);
- if (system(sfx[5].cmd))
- pthread_exit(NULL);
+ system(sfx[5].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_new_level.c b/src/ft_sfx_new_level.c
index e4f3bff..09cd8f1 100644
--- a/src/ft_sfx_new_level.c
+++ b/src/ft_sfx_new_level.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[2].mutex);
- if (system(sfx[2].cmd))
- pthread_exit(NULL);
+ system(sfx[2].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_ooa.c b/src/ft_sfx_ooa.c
index 5950d2e..86f47a1 100644
--- a/src/ft_sfx_ooa.c
+++ b/src/ft_sfx_ooa.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[12].mutex);
- if (system(sfx[12].cmd))
- pthread_exit(NULL);
+ system(sfx[12].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_pain.c b/src/ft_sfx_pain.c
index d55c01c..ea46460 100644
--- a/src/ft_sfx_pain.c
+++ b/src/ft_sfx_pain.c
@@ -31,11 +31,12 @@ void
ref = (ref > 201) ? (0) : (ref + 1);
if (ref % 3)
{
- if (system(sfx[3].cmd))
- pthread_exit(NULL);
+ system(sfx[3].cmd);
+ }
+ else
+ {
+ system(sfx[3].cmd_alt);
}
- else if (system(sfx[3].cmd_alt))
- pthread_exit(NULL);
}
return (NULL);
}
diff --git a/src/ft_sfx_trap.c b/src/ft_sfx_trap.c
index 5ae39f0..19c240b 100644
--- a/src/ft_sfx_trap.c
+++ b/src/ft_sfx_trap.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[4].mutex);
- if (system(sfx[4].cmd))
- pthread_exit(NULL);
+ system(sfx[4].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_weapon_one.c b/src/ft_sfx_weapon_one.c
index 2cc8dcc..6725a68 100644
--- a/src/ft_sfx_weapon_one.c
+++ b/src/ft_sfx_weapon_one.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[6].mutex);
- if (system(sfx[6].cmd))
- pthread_exit(NULL);
+ system(sfx[6].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_weapon_three.c b/src/ft_sfx_weapon_three.c
index 65c6903..2e94ee3 100644
--- a/src/ft_sfx_weapon_three.c
+++ b/src/ft_sfx_weapon_three.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[10].mutex);
- if (system(sfx[10].cmd))
- pthread_exit(NULL);
+ system(sfx[10].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_weapon_two.c b/src/ft_sfx_weapon_two.c
index 6d8e4a7..4667ff5 100644
--- a/src/ft_sfx_weapon_two.c
+++ b/src/ft_sfx_weapon_two.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[8].mutex);
- if (system(sfx[8].cmd))
- pthread_exit(NULL);
+ system(sfx[8].cmd);
}
return (NULL);
}
diff --git a/src/ft_sfx_weapon_two_alt.c b/src/ft_sfx_weapon_two_alt.c
index 7702fce..a4460bb 100644
--- a/src/ft_sfx_weapon_two_alt.c
+++ b/src/ft_sfx_weapon_two_alt.c
@@ -27,8 +27,7 @@ void
while (1)
{
pthread_mutex_lock(&sfx[16].mutex);
- if (system(sfx[16].cmd))
- pthread_exit(NULL);
+ system(sfx[16].cmd);
}
return (NULL);
}
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c
index f69ec42..abbed03 100644
--- a/src/ft_warp_level.c
+++ b/src/ft_warp_level.c
@@ -86,6 +86,7 @@ static void
{
pthread_cancel(cl->mtid);
pthread_join(cl->mtid, NULL);
+ system(FT_SND_TERM_CMD);
ft_enable_music(cl);
}
else if (isoldmus && cl->mlist.ismusic