From 9c8e284eadbb32591246fff48a53f33c459ad4b8 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sun, 29 Jul 2018 12:43:24 +0300 Subject: [PATCH] Fix quick key activation delay code (regression #4536) --- apps/openmw/mwgui/quickkeysmenu.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwgui/quickkeysmenu.cpp b/apps/openmw/mwgui/quickkeysmenu.cpp index badf50213..457bb5588 100644 --- a/apps/openmw/mwgui/quickkeysmenu.cpp +++ b/apps/openmw/mwgui/quickkeysmenu.cpp @@ -324,15 +324,19 @@ namespace MWGui bool isReturnNeeded = playerStats.isParalyzed() || playerStats.isDead(); - if (isReturnNeeded) + if (isReturnNeeded && key->type != Type_Item) + { return; - - else if (isDelayNeeded) + } + else if (isDelayNeeded && key->type != Type_Item) + { mActivated = key; - + return; + } else + { mActivated = nullptr; - + } if (key->type == Type_Item || key->type == Type_MagicItem) { @@ -370,6 +374,11 @@ namespace MWGui // delay weapon switching if player is busy if (isDelayNeeded && (isWeapon || isTool)) + { + mActivated = key; + return; + } + else if (isReturnNeeded && (isWeapon || isTool)) { return; }