From ce61c38660f5efe04b78b53d3878c72a3baec32b Mon Sep 17 00:00:00 2001 From: CommonLoon102 <321850+CommonLoon102@users.noreply.github.com> Date: Mon, 30 Sep 2019 05:43:54 +0000 Subject: [PATCH] Fixing annoying item use after save game (#192) --- source/blood/src/gamemenu.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/source/blood/src/gamemenu.cpp b/source/blood/src/gamemenu.cpp index c9c13100b..b1b9759f6 100644 --- a/source/blood/src/gamemenu.cpp +++ b/source/blood/src/gamemenu.cpp @@ -2071,20 +2071,18 @@ bool CGameMenuItemZEditBitmap::Event(CGameMenuEvent &event) gSaveGameActive = true; return true; case kMenuEventEnter: - if (!at35) + if (!at35 || bScan) { if (at30) at30(this, &event); + if (bScan) + { + bScan = 0; + gGameMenuMgr.m_bScanning = false; + } gSaveGameActive = false; - return false; - } - if (bScan) - { - if (at30) - at30(this, &event); - bScan = 0; - gGameMenuMgr.m_bScanning = false; - gSaveGameActive = false; + KB_ClearKeyDown(sc_Enter); + KB_ClearKeyDown(sc_kpad_Enter); return false; } strncpy(buffer, at20, at24); @@ -2102,7 +2100,7 @@ bool CGameMenuItemZEditBitmap::Event(CGameMenuEvent &event) case kMenuEventSpace: { char key; - if (event.at2 < 128) + if (bScan && event.at2 < 128) { if (keystatus[sc_LeftShift] || keystatus[sc_RightShift]) key = g_keyAsciiTableShift[event.at2];