From: Holger Schemel Date: Fri, 18 Dec 2020 01:09:37 +0000 (+0100) Subject: added variable to store if request dialog is active or opening/closing X-Git-Tag: 4.2.2.0~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9b8ae38bcff8bb38d72b1d352a5debff85bc6291;p=rocksndiamonds.git added variable to store if request dialog is active or opening/closing --- diff --git a/src/game.c b/src/game.c index edf7f6ab..cb107f0e 100644 --- a/src/game.c +++ b/src/game.c @@ -4447,7 +4447,9 @@ void InitGame(void) game.restart_level = FALSE; game.restart_game_message = NULL; + game.request_active = FALSE; + game.request_active_or_moving = FALSE; if (level.game_engine_type == GAME_ENGINE_TYPE_MM) InitGameActions_MM(); diff --git a/src/game.h b/src/game.h index 0851c540..b34d4344 100644 --- a/src/game.h +++ b/src/game.h @@ -236,6 +236,7 @@ struct GameInfo // values for special request dialog control boolean request_active; + boolean request_active_or_moving; // values for special game control int centered_player_nr; diff --git a/src/init.c b/src/init.c index c5427aca..210594fc 100644 --- a/src/init.c +++ b/src/init.c @@ -5205,7 +5205,9 @@ static void InitGameInfo(void) { game.restart_level = FALSE; game.restart_game_message = NULL; + game.request_active = FALSE; + game.request_active_or_moving = FALSE; } static void InitPlayerInfo(void) diff --git a/src/tools.c b/src/tools.c index 2157ef74..8a2d895a 100644 --- a/src/tools.c +++ b/src/tools.c @@ -4804,6 +4804,8 @@ boolean Request(char *text, unsigned int req_state) boolean overlay_enabled = GetOverlayEnabled(); boolean result; + game.request_active_or_moving = TRUE; + SetOverlayEnabled(FALSE); if (global.use_envelope_request) @@ -4813,6 +4815,8 @@ boolean Request(char *text, unsigned int req_state) SetOverlayEnabled(overlay_enabled); + game.request_active_or_moving = FALSE; + return result; }