1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 22:39:42 +00:00

Allow creatures to use torches

This commit is contained in:
Evil Eye 2021-10-31 20:25:37 +01:00
parent 8c06558cf8
commit 92bdd44e58
2 changed files with 5 additions and 6 deletions

View file

@ -65,6 +65,7 @@
Bug #6326: Detect Enchantment/Key should detect items in unresolved containers
Bug #6347: PlaceItem/PlaceItemCell/PlaceAt should work with levelled creatures
Bug #6363: Some scripts in Morrowland fail to work
Bug #6376: Creatures should be able to use torches
Feature #890: OpenMW-CS: Column filtering
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
Feature #2780: A way to see current OpenMW version in the console

View file

@ -1496,15 +1496,13 @@ namespace MWMechanics
stats.getAiSequence().execute(iter->first, *ctrl, duration, /*outOfRange*/true);
}
if(iter->first.getClass().isNpc())
if(inProcessingRange && iter->first.getClass().isNpc())
{
// We can not update drowning state for actors outside of AI distance - they can not resurface to breathe
if (inProcessingRange)
updateDrowning(iter->first, duration, ctrl->isKnockedOut(), isPlayer);
if (timerUpdateEquippedLight == 0)
updateEquippedLight(iter->first, updateEquippedLightInterval, showTorches);
updateDrowning(iter->first, duration, ctrl->isKnockedOut(), isPlayer);
}
if(timerUpdateEquippedLight == 0 && iter->first.getClass().hasInventoryStore(iter->first))
updateEquippedLight(iter->first, updateEquippedLightInterval, showTorches);
if (luaControls && isConscious(iter->first))
{