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 380614c4b9799c766d0104d11135be76aa127648..fb56f906e1efd6bcebf8b496f6935056bf419ca7 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 9deb974cc553d439dc8279ff8e45e61f22b5c28f..4b8af186277318ca209d22cc6447919efab9ed4b 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();
     }
   }