From f1d72419de328fa734ff54dabdeef093f85f6ce7 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 28 Aug 2014 00:59:54 +0200 Subject: [PATCH] Don't equip weapons in autoEquip, AiCombat does that now (Fixes #1451) --- apps/openmw/mwworld/inventorystore.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index dcbe707b7..7ea4a0bf1 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -198,11 +198,6 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) continue; } - // Don't auto-equip probes or lockpicks. NPCs can't use them (yet). And AiCombat would attempt to "attack" with them. - // NOTE: In the future AiCombat should handle equipping appropriate weapons - if (test.getTypeName() == typeid(ESM::Lockpick).name() || test.getTypeName() == typeid(ESM::Probe).name()) - continue; - // Only autoEquip if we are the original owner of the item. // This stops merchants from auto equipping anything you sell to them. // ...unless this is a companion, he should always equip items given to him. @@ -219,6 +214,10 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) for (std::vector::const_iterator iter2 (itemsSlots.first.begin()); iter2!=itemsSlots.first.end(); ++iter2) { + if (*iter2 == Slot_CarriedRight) // Items in right hand are situational use, so don't equip them. + // Equipping weapons is handled by AiCombat. Anything else (lockpicks, probes) can't be used by NPCs anyway (yet) + continue; + bool use = false; if (slots_.at (*iter2)==end())