From: Holger Schemel Date: Tue, 21 Mar 2023 04:43:41 +0000 (+0100) Subject: fixed playing "game.losing" sound also if not asking to play again X-Git-Tag: 4.3.5.3~36 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=cc87512c58b885ea16697b0017201c900fce8428;p=rocksndiamonds.git fixed playing "game.losing" sound also if not asking to play again --- diff --git a/src/game.c b/src/game.c index d91d8ac3..1cbea93f 100644 --- a/src/game.c +++ b/src/game.c @@ -15711,6 +15711,10 @@ void CheckGameOver(void) return; } + // do not ask to play again if this was disabled in setup menu + if (!setup.ask_on_game_over) + return; + if (last_game_over != game_over) game.restart_game_message = getRestartGameMessage(); diff --git a/src/screens.c b/src/screens.c index 4d8f50e0..eecb688b 100644 --- a/src/screens.c +++ b/src/screens.c @@ -9527,8 +9527,7 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button) void HandleGameActions(void) { - if (setup.ask_on_game_over) - CheckGameOver(); + CheckGameOver(); if (game.restart_game_message != NULL) {