From 4469cf7edb5911d6801f2952b1a96f422c33ebf1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 23 Aug 2020 21:24:31 +0200 Subject: [PATCH] - only go from menu to console when closing with Escape. --- source/core/menu/menu.cpp | 2 +- source/sw/src/save.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/core/menu/menu.cpp b/source/core/menu/menu.cpp index 8b5c25587..59c3a0e5a 100644 --- a/source/core/menu/menu.cpp +++ b/source/core/menu/menu.cpp @@ -208,6 +208,7 @@ bool DMenu::MenuEvent (int mkey, bool fromcontroller) { M_MenuSound(CurrentMenu->mParentMenu? BackSound : CloseSound); Close(); + if (!CurrentMenu && gamestate == GS_MENUSCREEN) C_FullConsole(); return true; } } @@ -964,7 +965,6 @@ void M_ClearMenus (bool final) if (!final) { gi->MenuClosed(); - if (gamestate == GS_MENUSCREEN) C_FullConsole(); } } diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index ddc3eb384..6cfd73152 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -693,6 +693,13 @@ bool GameInterface::LoadGame(FSaveGameNode* sv) //MREAD(Player,sizeof(PLAYER), numplayers,fil); //save players info + + for (auto& pp : Player) + { + pp.cookieTime = 0; + memset(pp.cookieQuote, 0, sizeof(pp.cookieQuote)); + } + for (i = 0; i < numplayers; i++) { pp = &Player[i];