From ce81cdf36f7241179d8aadb9f1d2e416e662868f Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 12 Oct 2018 19:34:30 +0200 Subject: [PATCH] added handling game actions also after unsolved game end (not used yet) --- src/tools.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tools.c b/src/tools.c index e9d11c13..b23a96dd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -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) { -- 2.34.1