added handling game actions also after unsolved game end (not used yet)
authorHolger Schemel <info@artsoft.org>
Fri, 12 Oct 2018 17:34:30 +0000 (19:34 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 12 Oct 2018 17:34:30 +0000 (19:34 +0200)
src/tools.c

index e9d11c13c2a1f29398e6b88a8e957781206ac372..b23a96dd7c0bd96a5a674617c0e15a079e04c8d4 100644 (file)
@@ -4236,13 +4236,17 @@ void WaitForEventToContinue(void)
 
 static int RequestHandleEvents(unsigned int req_state)
 {
-  boolean level_solved = (game_status == GAME_MODE_PLAYING &&
-                         local_player->LevelSolved_GameEnd);
+  boolean game_just_ended = (game_status == GAME_MODE_PLAYING &&
+                            checkGameEnded());
   int width  = request.width;
   int height = request.height;
   int sx, sy;
   int result;
 
+  /* when showing request dialog after game ended, deactivate game panel */
+  if (game_just_ended)
+    game.panel.active = FALSE;
+
   game.request_active = TRUE;
 
   setRequestPosition(&sx, &sy, FALSE);
@@ -4254,7 +4258,7 @@ static int RequestHandleEvents(unsigned int req_state)
 
   while (result < 0)
   {
-    if (level_solved)
+    if (game_just_ended)
     {
       /* the MM game engine does not use a special (scrollable) field buffer */
       if (level.game_engine_type != GAME_ENGINE_TYPE_MM)
@@ -4533,7 +4537,7 @@ static int RequestHandleEvents(unsigned int req_state)
       }
     }
 
-    if (level_solved)
+    if (game_just_ended)
     {
       if (global.use_envelope_request)
       {