From bd93e63150dc69c0e3caf27231dfbede99772baf Mon Sep 17 00:00:00 2001 From: Glorf Date: Tue, 9 Apr 2013 19:46:27 +0200 Subject: [PATCH] Fifth minor fix --- apps/openmw/mwworld/actionequip.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/openmw/mwworld/actionequip.cpp b/apps/openmw/mwworld/actionequip.cpp index 39c5abe345..fd35d0dd3c 100644 --- a/apps/openmw/mwworld/actionequip.cpp +++ b/apps/openmw/mwworld/actionequip.cpp @@ -21,6 +21,18 @@ namespace MWWorld MWWorld::Ptr object = getTarget(); MWWorld::InventoryStore& invStore = MWWorld::Class::get(actor).getInventoryStore(actor); + switch(MWWorld::Class::get (object).canBeEquipped (actor, object)) + { + case 0: + return; + case 2: + invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end()); + break; + case 3: + invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end()); + break; + } + // slots that this item can be equipped in std::pair, bool> slots = MWWorld::Class::get(getTarget()).getEquipmentSlots(getTarget()); @@ -40,18 +52,6 @@ namespace MWWorld bool equipped = false; - switch(MWWorld::Class::get (object).canBeEquipped (actor, object)) - { - case 0: - return; - case 2: - invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end()); - break; - case 3: - invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end()); - break; - } - // equip the item in the first free slot for (std::vector::const_iterator slot=slots.first.begin(); slot!=slots.first.end(); ++slot)