swapped condition logic for better readability
authorHolger Schemel <info@artsoft.org>
Sat, 25 Aug 2018 12:58:44 +0000 (14:58 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 25 Aug 2018 12:58:44 +0000 (14:58 +0200)
src/game.c
src/screens.c

index 380614c..fb56f90 100644 (file)
@@ -4724,15 +4724,15 @@ void GameEnd()
 
     DrawHallOfFame(last_level_nr, hi_pos);
   }
-  else if (!setup.auto_play_next_level || !setup.increment_levels)
+  else if (setup.auto_play_next_level && setup.increment_levels)
   {
-    SetGameStatus(GAME_MODE_MAIN);
-
-    DrawMainMenu();
+    StartGameActions(network.enabled, setup.autorecord, level.random_seed);
   }
   else
   {
-    StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+    SetGameStatus(GAME_MODE_MAIN);
+
+    DrawMainMenu();
   }
 }
 
index 9deb974..4b8af18 100644 (file)
@@ -4630,16 +4630,16 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
 
     FadeSound(SND_BACKGROUND_SCORES);
 
-    if (game_status_last_screen != GAME_MODE_PLAYING ||
-       !setup.auto_play_next_level || !setup.increment_levels)
+    if (game_status_last_screen == GAME_MODE_PLAYING &&
+       setup.auto_play_next_level && setup.increment_levels)
     {
-      SetGameStatus(GAME_MODE_MAIN);
-
-      DrawMainMenu();
+      StartGameActions(network.enabled, setup.autorecord, level.random_seed);
     }
     else
     {
-      StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+      SetGameStatus(GAME_MODE_MAIN);
+
+      DrawMainMenu();
     }
   }