Third minor fix

This commit is contained in:
Glorf 2013-04-09 19:04:59 +02:00
parent 46925e93a6
commit 44ef02eb99

View file

@ -40,20 +40,21 @@ namespace MWWorld
bool equipped = false;
// equip the item in the first free slot
for (std::vector<int>::const_iterator slot=slots.first.begin();
slot!=slots.first.end(); ++slot)
{
switch(MWWorld::Class::get (object).canBeEquipped (actor, object))
{
case 0:
return;
return; //Item cannot be equipped, so function breaks.
case 2:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end());
case 3:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end());
}
// equip the item in the first free slot
for (std::vector<int>::const_iterator slot=slots.first.begin();
slot!=slots.first.end(); ++slot)
{
// if all slots are occupied, replace the last slot
if (slot == --slots.first.end())
{