From d2752b73ff3f10333de06162cd312d9afa6df057 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 12 Apr 2023 14:01:48 +0200 Subject: [PATCH] added playing the first unconfigured music file in the first level Before, the (unconfigured) music file to be played in the first level of a level set depended on the number of the first level (with the result that the first music file was played in level 000, the second music file was played in level 001 and so on, which probably was not the intended behaviour when the level set started with level 001). Now the first music file in the list of unconfigured music files is played in the first level of a level set, regardless of the number of that level (which is either 000 or 001 for most level sets). --- src/game.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game.c b/src/game.c index 6473b49a..a6287f2e 100644 --- a/src/game.c +++ b/src/game.c @@ -15241,10 +15241,12 @@ static void StopLevelSoundActionIfLoop(int x, int y, int action) static int getLevelMusicNr(void) { + int level_pos = level_nr - leveldir_current->first_level; + if (levelset.music[level_nr] != MUS_UNDEFINED) return levelset.music[level_nr]; // from config file else - return MAP_NOCONF_MUSIC(level_nr); // from music dir + return MAP_NOCONF_MUSIC(level_pos); // from music dir } static void FadeLevelSounds(void) -- 2.34.1