From 336a6132231911f8363711341c77f4072a99d5bd Mon Sep 17 00:00:00 2001 From: Cong Date: Mon, 2 Dec 2024 17:54:07 +1100 Subject: [PATCH] Fix wolf getting stuck if sound missing (fixes #865) --- src/cdogs/map_wolf.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/cdogs/map_wolf.c b/src/cdogs/map_wolf.c index 5f44fc996..f9224991a 100644 --- a/src/cdogs/map_wolf.c +++ b/src/cdogs/map_wolf.c @@ -891,17 +891,16 @@ static void LoadSounds(const SoundDevice *s, const CWolfMap *map) while (name != NULL) { Mix_Chunk *data = LoadSoundData(map, i); - if (data == NULL) + if (data != NULL) { - continue; - } - if (name[strlen(name) - 1] == '/') - { - AddRandomSound(s, name, data); - } - else - { - AddNormalSound(s, name, data); + if (name[strlen(name) - 1] == '/') + { + AddRandomSound(s, name, data); + } + else + { + AddNormalSound(s, name, data); + } } name = strtok(NULL, "|"); }