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 40efde1..94f4893 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 851e0a5..5900616 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);