From ef9580fb83b80c2e324d40df1bb1b65591e51391 Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Fri, 23 Mar 2018 21:59:40 +0100 Subject: [PATCH] fix #2683 step2 --- src/synced_commands.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/synced_commands.cpp b/src/synced_commands.cpp index 63e1bc407fbc..bdd74a0323bf 100644 --- a/src/synced_commands.cpp +++ b/src/synced_commands.cpp @@ -32,6 +32,7 @@ #include "units/helper.hpp" #include "recall_list_manager.hpp" #include "resources.hpp" +#include "savegame.hpp" #include "scripting/game_lua_kernel.hpp" #include "formula/string_utils.hpp" #include "units/types.hpp" @@ -396,8 +397,12 @@ namespace if(show_long_message && !ignore) { play_controller::scoped_savegame_snapshot snapshot(controller); - auto& gamestate = controller.gamestate(); - //TODO: implement by copying oos_savegame + std::stringstream message; + // TODO: improve message and mark translatable. + message << "The game detected the use of a debug command, maybe another player is cheating"; + message << "\n\n" << "details:" << "\n\n" << message; + savegame::oos_savegame save(controller.gamestate(), ignore); + save.save_game_interactive(message.str(), savegame::savegame::YES_NO); // can throw quit_game_exception } else { utils::string_map symbols;