Check if related menus are allowed when using cycle hotkeys (bug #5167)

pull/545/head
Andrei Kortunov 5 years ago
parent 13a0b3bf5a
commit 1bddbbcfa0

@ -145,6 +145,7 @@
Bug #5161: Creature companions can't be activated when they are knocked down Bug #5161: Creature companions can't be activated when they are knocked down
Bug #5164: Faction owned items handling is incorrect Bug #5164: Faction owned items handling is incorrect
Bug #5166: Scripts still should be executed after player's death Bug #5166: Scripts still should be executed after player's death
Bug #5167: Player can select and cast spells before magic menu is enabled
Feature #1774: Handle AvoidNode Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls Feature #3025: Analogue gamepad movement controls

@ -471,19 +471,19 @@ namespace MWInput
quickLoad(); quickLoad();
break; break;
case A_CycleSpellLeft: case A_CycleSpellLeft:
if (checkAllowedToUseItems()) if (checkAllowedToUseItems() && MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Magic))
MWBase::Environment::get().getWindowManager()->cycleSpell(false); MWBase::Environment::get().getWindowManager()->cycleSpell(false);
break; break;
case A_CycleSpellRight: case A_CycleSpellRight:
if (checkAllowedToUseItems()) if (checkAllowedToUseItems() && MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Magic))
MWBase::Environment::get().getWindowManager()->cycleSpell(true); MWBase::Environment::get().getWindowManager()->cycleSpell(true);
break; break;
case A_CycleWeaponLeft: case A_CycleWeaponLeft:
if (checkAllowedToUseItems()) if (checkAllowedToUseItems() && MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
MWBase::Environment::get().getWindowManager()->cycleWeapon(false); MWBase::Environment::get().getWindowManager()->cycleWeapon(false);
break; break;
case A_CycleWeaponRight: case A_CycleWeaponRight:
if (checkAllowedToUseItems()) if (checkAllowedToUseItems() && MWBase::Environment::get().getWindowManager()->isAllowed(MWGui::GW_Inventory))
MWBase::Environment::get().getWindowManager()->cycleWeapon(true); MWBase::Environment::get().getWindowManager()->cycleWeapon(true);
break; break;
case A_Sneak: case A_Sneak:

Loading…
Cancel
Save