From aaeb64888fb9d05326755052add2c5ea960463d1 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 6 Aug 2019 17:59:17 +0200 Subject: [PATCH] Do not pause the game during save/load prompt in networked mode --- src/openrct2-ui/windows/SavePrompt.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index ba95404a92..5770edb24e 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -134,7 +135,7 @@ rct_window* window_save_prompt_open() * and game_load_or_quit() are not called by the original binary anymore. */ - if (gScreenAge < 3840) + if (gScreenAge < 3840 && network_get_mode() == NETWORK_MODE_NONE) { game_load_or_quit_no_save_prompt(); return nullptr; @@ -175,9 +176,13 @@ rct_window* window_save_prompt_open() window->enabled_widgets = enabled_widgets; window_init_scroll_widgets(window); - // Pause the game - gGamePaused |= GAME_PAUSED_MODAL; - audio_stop_all_music_and_sounds(); + // Pause the game if not network play. + if (network_get_mode() == NETWORK_MODE_NONE) + { + gGamePaused |= GAME_PAUSED_MODAL; + audio_stop_all_music_and_sounds(); + } + window_invalidate_by_class(WC_TOP_TOOLBAR); stringId = window_save_prompt_labels[prompt_mode][0]; @@ -198,8 +203,12 @@ rct_window* window_save_prompt_open() static void window_save_prompt_close(rct_window* w) { // Unpause the game - gGamePaused &= ~GAME_PAUSED_MODAL; - audio_unpause_sounds(); + if (network_get_mode() == NETWORK_MODE_NONE) + { + gGamePaused &= ~GAME_PAUSED_MODAL; + audio_unpause_sounds(); + } + window_invalidate_by_class(WC_TOP_TOOLBAR); }