removed variable that always had the same value when checked
authorHolger Schemel <info@artsoft.org>
Wed, 22 Mar 2023 18:09:03 +0000 (19:09 +0100)
committerHolger Schemel <info@artsoft.org>
Wed, 22 Mar 2023 18:09:26 +0000 (19:09 +0100)
src/game.c

index c5d941dd093b0882faf8d9b2dbd16c1e7ea23f86..b10c4f7102ac27d3e9879f48d9d3a1bc8112324f 100644 (file)
@@ -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)