From 49125fa26e5427c031ee9fcea22d38343cb0d8cd Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 14 Nov 2013 19:54:00 +0100 Subject: [PATCH] Fix restacking unequipped items --- apps/openmw/mwworld/inventorystore.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 456c07202c..f25a3edff8 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -443,6 +443,9 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c { ContainerStoreIterator retval = it; + // empty this slot + mSlots[slot] = end(); + if (restack) { // restack item previously in this slot for (MWWorld::ContainerStoreIterator iter (begin()); iter != end(); ++iter) @@ -457,9 +460,6 @@ MWWorld::ContainerStoreIterator MWWorld::InventoryStore::unequipSlot(int slot, c } } - // empty this slot - mSlots[slot] = end(); - if (actor.getRefData().getHandle() == "player") { // Unset OnPCEquip Variable on item's script, if it has a script with that variable declared