mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:15:32 +00:00
Don't equip weapons in autoEquip, AiCombat does that now (Fixes #1451)
This commit is contained in:
parent
0fe9612afb
commit
f1d72419de
1 changed files with 4 additions and 5 deletions
|
@ -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<int>::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())
|
||||
|
|
Loading…
Reference in a new issue