From 4ab72a4d9a1152d33e19d63b53a9151672548371 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 15 Feb 2015 17:24:54 +0000 Subject: [PATCH] Hide save/load game in non-coop multiplayer Multiplayer non-coop cannot save, so offering the options is pointless. Fixes: 7338bb2402ee27a19dfe137e47ec0efa473638d9 ("Extend in-game esc menu with options and saving") Reported by: zicodxx @ https://github.com/dxx-rebirth/dxx-rebirth/issues/42 --- similar/main/gamecntl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/similar/main/gamecntl.cpp b/similar/main/gamecntl.cpp index 0ef773726..e500a9eb8 100644 --- a/similar/main/gamecntl.cpp +++ b/similar/main/gamecntl.cpp @@ -718,7 +718,8 @@ static window_event_result HandleSystemKey(int key) case KEY_ESC: { - const auto choice = nm_messagebox(NULL, 4, "Abort Game", TXT_OPTIONS_, "Save Game...", TXT_LOAD_GAME, "Game Menu"); + const bool allow_saveload = !(Game_mode & GM_MULTI) || (Game_mode & GM_MULTI_COOP); + const auto choice = nm_messagebox_str(nullptr, allow_saveload ? nm_messagebox_tie("Abort Game", TXT_OPTIONS_, "Save Game...", TXT_LOAD_GAME) : nm_messagebox_tie("Abort Game", TXT_OPTIONS_), "Game Menu"); switch(choice) { case 0: