X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=b23a96dd7c0bd96a5a674617c0e15a079e04c8d4;hb=298cffce2845fea10a2f0420a26db13ea9179e57;hp=f89b2b250eeebc8a7d087043e05e344ce6fc2f0c;hpb=bfc32a480c54857e24987e9f38d12cd5139dde4b;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index f89b2b25..b23a96dd 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4236,13 +4236,19 @@ 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); button_status = MB_RELEASED; @@ -4252,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) @@ -4531,7 +4537,7 @@ static int RequestHandleEvents(unsigned int req_state) } } - if (level_solved) + if (game_just_ended) { if (global.use_envelope_request) { @@ -4543,6 +4549,8 @@ static int RequestHandleEvents(unsigned int req_state) BackToFront(); } + game.request_active = FALSE; + return result; }