Merge branch 'enlightened_skeletons' into 'master'

Allow creatures to use torches

Closes #6376

See merge request OpenMW/openmw!1335
pull/3212/head
psi29a 3 years ago
commit ea7e83499d

@ -66,6 +66,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

@ -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))
{

Loading…
Cancel
Save