mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-26 06:36:48 +00:00
Avoid crashes upon Weapon::canBeEquipped attack check for the inventory doll
This commit is contained in:
parent
0b5823d5b7
commit
30cff6f6ee
1 changed files with 2 additions and 2 deletions
|
@ -276,8 +276,8 @@ namespace MWClass
|
||||||
return { 0, "#{sInventoryMessage1}" };
|
return { 0, "#{sInventoryMessage1}" };
|
||||||
|
|
||||||
// Do not allow equip weapons from inventory during attack
|
// Do not allow equip weapons from inventory during attack
|
||||||
if (MWBase::Environment::get().getMechanicsManager()->isAttackingOrSpell(npc)
|
if (npc.isInCell() && MWBase::Environment::get().getWindowManager()->isGuiMode()
|
||||||
&& MWBase::Environment::get().getWindowManager()->isGuiMode())
|
&& MWBase::Environment::get().getMechanicsManager()->isAttackingOrSpell(npc))
|
||||||
return { 0, "#{sCantEquipWeapWarning}" };
|
return { 0, "#{sCantEquipWeapWarning}" };
|
||||||
|
|
||||||
std::pair<std::vector<int>, bool> slots_ = getEquipmentSlots(ptr);
|
std::pair<std::vector<int>, bool> slots_ = getEquipmentSlots(ptr);
|
||||||
|
|
Loading…
Reference in a new issue