fixed bug with repeating last level in levelset when auto-playing next level
authorHolger Schemel <info@artsoft.org>
Wed, 10 Oct 2018 22:10:44 +0000 (00:10 +0200)
committerHolger Schemel <info@artsoft.org>
Wed, 10 Oct 2018 22:10:44 +0000 (00:10 +0200)
src/game.c
src/screens.c

index 40efde17d7321a5dcac60e754bea4c0230e16ddf..94f489340b0e5881af83aacaadb59463543e9c1b 100644 (file)
@@ -4734,6 +4734,7 @@ void GameEnd(void)
     DrawHallOfFame(last_level_nr, hi_pos);
   }
   else if (setup.auto_play_next_level && setup.increment_levels &&
+          last_level_nr < leveldir_current->last_level &&
           !network_playing)
   {
     StartGameActions(network.enabled, setup.autorecord, level.random_seed);
index 851e0a55277d93d1b744a55bd5cb284bbdd7b352..5900616f1956d78c6ad87b6b1585ca4971f995a9 100644 (file)
@@ -4662,6 +4662,7 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
 
     if (game_status_last_screen == GAME_MODE_PLAYING &&
        setup.auto_play_next_level && setup.increment_levels &&
+       level_nr < leveldir_current->last_level &&
        !network_playing)
     {
       StartGameActions(network.enabled, setup.autorecord, level.random_seed);