mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 10:36:42 +00:00
Switch torches to shields for hostile NPCs (bug #5300)
This commit is contained in:
parent
a01c44bbdd
commit
1da4b31047
2 changed files with 6 additions and 0 deletions
|
@ -202,6 +202,7 @@
|
||||||
Bug #5264: "Damage Fatigue" Magic Effect Can Bring Fatigue below 0
|
Bug #5264: "Damage Fatigue" Magic Effect Can Bring Fatigue below 0
|
||||||
Bug #5269: Editor: Cell lighting in resaved cleaned content files is corrupted
|
Bug #5269: Editor: Cell lighting in resaved cleaned content files is corrupted
|
||||||
Bug #5278: Console command Show doesn't fall back to global variable after local var not found
|
Bug #5278: Console command Show doesn't fall back to global variable after local var not found
|
||||||
|
Bug #5300: NPCs don't switch from torch to shield when starting combat
|
||||||
Feature #1415: Infinite fall failsafe
|
Feature #1415: Infinite fall failsafe
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
|
|
|
@ -1234,6 +1234,11 @@ namespace MWMechanics
|
||||||
if (heldIter != inventoryStore.end() && heldIter->getTypeName() != typeid(ESM::Light).name())
|
if (heldIter != inventoryStore.end() && heldIter->getTypeName() != typeid(ESM::Light).name())
|
||||||
inventoryStore.unequipItem(*heldIter, ptr);
|
inventoryStore.unequipItem(*heldIter, ptr);
|
||||||
}
|
}
|
||||||
|
else if (heldIter == inventoryStore.end() || heldIter->getTypeName() == typeid(ESM::Light).name())
|
||||||
|
{
|
||||||
|
// For hostile NPCs, see if they have anything better to equip first
|
||||||
|
inventoryStore.autoEquip(ptr);
|
||||||
|
}
|
||||||
|
|
||||||
heldIter = inventoryStore.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
heldIter = inventoryStore.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue