From: Holger Schemel Date: Wed, 22 Mar 2023 18:09:03 +0000 (+0100) Subject: removed variable that always had the same value when checked X-Git-Tag: 4.3.5.3~32 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1f6e5b67296a3c23aa8c28661d4ab21f688ddd34;p=rocksndiamonds.git removed variable that always had the same value when checked --- diff --git a/src/game.c b/src/game.c index c5d941dd..b10c4f71 100644 --- a/src/game.c +++ b/src/game.c @@ -15680,14 +15680,12 @@ static char *getRestartGameMessage(void) boolean CheckRestartGame(void) { - static boolean last_game_over = FALSE; static int game_over_delay = 0; int game_over_delay_value = 50; boolean game_over = checkGameFailed(); if (!game_over) { - last_game_over = FALSE; game_over_delay = game_over_delay_value; return FALSE; @@ -15715,19 +15713,11 @@ boolean CheckRestartGame(void) if (!setup.ask_on_game_over) return FALSE; - if (last_game_over != game_over) - game.restart_game_message = getRestartGameMessage(); + game.restart_game_message = getRestartGameMessage(); - last_game_over = game_over; + RequestRestartGame(game.restart_game_message); - if (game.restart_game_message != NULL) - { - RequestRestartGame(game.restart_game_message); - - return TRUE; - } - - return FALSE; + return TRUE; } boolean checkGameSolved(void)