From 13d53a33dce15a83501ea40f605439ebbc53caae Mon Sep 17 00:00:00 2001 From: DakkJaniels <6080734+DakkJaniels@users.noreply.github.com> Date: Sun, 31 Jul 2022 18:10:13 -0400 Subject: [PATCH] move gold drop checks earlier --- Source/diablo.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 4963fb29b..ff8c958e1 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -472,7 +472,16 @@ void PressKey(SDL_Keycode vkey, uint16_t modState) return; } - if (sgnTimeoutCurs != CURSOR_NONE || dropGoldFlag || IsWithdrawGoldOpen) { + if (dropGoldFlag) { + control_drop_gold(vkey); + return; + } + if (IsWithdrawGoldOpen) { + WithdrawGoldKeyPress(vkey); + return; + } + + if (sgnTimeoutCurs != CURSOR_NONE) { return; } @@ -490,14 +499,6 @@ void PressKey(SDL_Keycode vkey, uint16_t modState) doom_close(); return; } - if (dropGoldFlag) { - control_drop_gold(vkey); - return; - } - if (IsWithdrawGoldOpen) { - WithdrawGoldKeyPress(vkey); - return; - } switch (vkey) { case SDLK_PLUS: