From: Holger Schemel Date: Wed, 12 Apr 2023 12:01:48 +0000 (+0200) Subject: added playing the first unconfigured music file in the first level X-Git-Tag: 4.3.6.0~31 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d2752b73ff3f10333de06162cd312d9afa6df057;p=rocksndiamonds.git 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). --- 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)