mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Fixes a regression with bound weapons equipping (bug #4050)
This commit is contained in:
parent
91dcd5bc6e
commit
0d7279ea2a
1 changed files with 3 additions and 1 deletions
|
@ -374,7 +374,9 @@ namespace MWClass
|
|||
if (hasItemHealth(ptr) && ptr.getCellRef().getCharge() == 0)
|
||||
return std::make_pair(0, "#{sInventoryMessage1}");
|
||||
|
||||
if (MWBase::Environment::get().getMechanicsManager()->isAttackingOrSpell(npc))
|
||||
// Do not allow equip weapons from inventory during attack
|
||||
if (MWBase::Environment::get().getMechanicsManager()->isAttackingOrSpell(npc)
|
||||
&& MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
return std::make_pair(0, "#{sCantEquipWeapWarning}");
|
||||
|
||||
std::pair<std::vector<int>, bool> slots_ = ptr.getClass().getEquipmentSlots(ptr);
|
||||
|
|
Loading…
Reference in a new issue