forked from mirror/openmw-tes3mp
Fix an auto equipping bug that allowed twohanded weapon and shield at the same time
This commit is contained in:
parent
d4a98ffc27
commit
12944f2459
1 changed files with 2 additions and 3 deletions
|
@ -165,7 +165,6 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::getSlot (int slot)
|
|||
void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
||||
{
|
||||
const MWMechanics::NpcStats& stats = MWWorld::Class::get(actor).getNpcStats(actor);
|
||||
MWWorld::InventoryStore& invStore = MWWorld::Class::get(actor).getInventoryStore(actor);
|
||||
|
||||
TSlots slots_;
|
||||
initSlots (slots_);
|
||||
|
@ -266,10 +265,10 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor)
|
|||
case 0:
|
||||
continue;
|
||||
case 2:
|
||||
invStore.unequipSlot(MWWorld::InventoryStore::Slot_CarriedLeft, actor);
|
||||
slots_[MWWorld::InventoryStore::Slot_CarriedLeft] = end();
|
||||
break;
|
||||
case 3:
|
||||
invStore.unequipSlot(MWWorld::InventoryStore::Slot_CarriedRight, actor);
|
||||
// Prefer keeping twohanded weapon
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue