added playing the first unconfigured music file in the first level
[rocksndiamonds.git] / src / game.c
index 6473b49a8030bf25ebcb47d333cc207d2fbb25b8..a6287f2e0b202b60cc889c4120c326b597bb61fb 100644 (file)
@@ -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)