diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-04 22:22:26 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-04 22:22:26 +0100 |
commit | 109c17dc68f08f0120e7ad9e7cdae93265afe7e0 (patch) | |
tree | 5f1749d0c02a5f4b67e8fac8dd9e54596772ee3b /src/ft_warp_level.c | |
parent | Maps is cool yo (diff) | |
download | 42-cub3d-109c17dc68f08f0120e7ad9e7cdae93265afe7e0.tar.gz 42-cub3d-109c17dc68f08f0120e7ad9e7cdae93265afe7e0.tar.bz2 42-cub3d-109c17dc68f08f0120e7ad9e7cdae93265afe7e0.tar.xz 42-cub3d-109c17dc68f08f0120e7ad9e7cdae93265afe7e0.tar.zst 42-cub3d-109c17dc68f08f0120e7ad9e7cdae93265afe7e0.zip |
Clean
Diffstat (limited to 'src/ft_warp_level.c')
-rw-r--r-- | src/ft_warp_level.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index a93184c..808b346 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -67,20 +67,14 @@ static void if (isoldmus && !cl->mlist.ismusic) { pthread_cancel(cl->tid); - if (FT_OS == 1) - pthread_kill(cl->tid, SIGTERM); - else - pthread_join(cl->tid, NULL); + pthread_join(cl->tid, NULL); cl->isoldmus = 0; } else if (isoldmus && cl->mlist.ismusic && ft_strncmp(tmp_mup, cl->mlist.music_path, ft_strlen(tmp_mup) + 1)) { pthread_cancel(cl->tid); - if (FT_OS == 1) - pthread_kill(cl->tid, SIGTERM); - else - pthread_join(cl->tid, NULL); + pthread_join(cl->tid, NULL); pthread_create(&cl->tid, NULL, ft_music_thread, cl); } else if (isoldmus && cl->mlist.ismusic @@ -102,8 +96,7 @@ int8_t cl->mlist.nlevel_path) + 1) * sizeof(char)))) return (-1); ft_sprintf(next_path, "%s", cl->mlist.nlevel_path); - isoldmus = cl->mlist.ismusic; - if (isoldmus) + if ((isoldmus = cl->mlist.ismusic)) tmp_mup = ft_strdup(cl->mlist.music_path); ft_del_some(cl); ft_del_map(&cl->mlist); |