From: Holger Schemel Date: Sat, 25 Aug 2018 12:58:44 +0000 (+0200) Subject: swapped condition logic for better readability X-Git-Tag: 4.1.1.0~55 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5cc97571f68595942bbab4e2beabf5af8dcacc34;p=rocksndiamonds.git swapped condition logic for better readability --- diff --git a/src/game.c b/src/game.c index 380614c4..fb56f906 100644 --- a/src/game.c +++ b/src/game.c @@ -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(); } } diff --git a/src/screens.c b/src/screens.c index 9deb974c..4b8af186 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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(); } }