From 513f5a8e4899854854ec10f495d907b7b4bd0960 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 9 Apr 2022 01:59:41 +0300 Subject: [PATCH 46/46] Client: Flush attributes before requesting saving game This makes savegame to contain last minute governor settings from the very client that requests the save, i.e., this should resolve the issue in single-player games. See osdn #44304 Signed-off-by: Marko Lindqvist --- client/connectdlg_common.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/connectdlg_common.c b/client/connectdlg_common.c index 472eb7ae16..3686a9820d 100644 --- a/client/connectdlg_common.c +++ b/client/connectdlg_common.c @@ -10,6 +10,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ***********************************************************************/ + #ifdef HAVE_CONFIG_H #include #endif @@ -54,6 +55,7 @@ #include "support.h" /* client */ +#include "attribute.h" #include "client_main.h" #include "climisc.h" #include "clinet.h" /* connect_to_server() */ @@ -723,7 +725,9 @@ void handle_single_want_hack_reply(bool you_have_hack) Send server command to save game. **************************************************************************/ void send_save_game(const char *filename) -{ +{ + attribute_flush(); + if (filename) { send_chat_printf("/save %s", filename); } else { -- 2.35.1