Allow creatures to use torches

pull/3212/head
Evil Eye 3 years ago
parent 8c06558cf8
commit 92bdd44e58

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

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