changed setting flag to continue playing next level from hall of fame
authorHolger Schemel <info@artsoft.org>
Wed, 11 May 2022 11:41:50 +0000 (13:41 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 11 May 2022 11:41:50 +0000 (13:41 +0200)
src/game.c
src/screens.c

index ca2fa98e521542e1b723fc73479e592c76a6744b..aff7972a58dc70b9f1e6ed620c77e2b6cacd2c48 100644 (file)
@@ -5050,6 +5050,8 @@ void GameEnd(void)
 
     if (setup.auto_play_next_level)
     {
+      scores.continue_playing = TRUE;
+
       LoadLevel(level_nr);
 
       SaveLevelSetup_SeriesInfo();
@@ -5062,9 +5064,7 @@ void GameEnd(void)
 
     DrawHallOfFame(last_level_nr);
   }
-  else if (setup.auto_play_next_level && setup.increment_levels &&
-          last_level_nr < leveldir_current->last_level &&
-          !network_playing)
+  else if (scores.continue_playing)
   {
     StartGameActions(network.enabled, setup.autorecord, level.random_seed);
   }
index 1450e51818557cb9c5e6d937dc289ba3cd2277be..e2308b4d4e455a345f36f9442b7f92f88cb1bf8d 100644 (file)
@@ -1721,6 +1721,9 @@ void DrawMainMenu(void)
     return;
   }
 
+  // reset flag to continue playing next level from hall of fame
+  scores.continue_playing = FALSE;
+
   // leveldir_current may be invalid (level group, parent link, node copy)
   leveldir_current = getValidLevelSeries(leveldir_current, leveldir_last_valid);
 
@@ -4342,9 +4345,6 @@ static void DrawChooseTree(TreeInfo **ti_ptr)
   boolean restart_music = (game_status != game_status_last_screen &&
                           game_status_last_screen != GAME_MODE_SCOREINFO);
 
-  scores.continue_playing = (game_status == GAME_MODE_SCORES &&
-                            game_status_last_screen == GAME_MODE_PLAYING);
-
   if (CheckFadeAll())
     fade_mask = REDRAW_ALL;