diff --git a/CHANGELOG.md b/CHANGELOG.md index f938c00ad..13c25ca1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ Bug #4969: "Miss" sound plays for any actor Bug #4972: Player is able to use quickkeys while disableplayerfighting is active Bug #4979: AiTravel maximum range depends on "actors processing range" setting + Bug #4980: Drowning mechanics is applied for actors indifferently from distance to player Feature #2229: Improve pathfinding AI Feature #3442: Default values for fallbacks from ini file Feature #3610: Option to invert X axis diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index b627bdafa..bf515c842 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1539,7 +1539,10 @@ namespace MWMechanics if(iter->first.getClass().isNpc()) { - updateDrowning(iter->first, duration, ctrl->isKnockedOut(), isPlayer); + // 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); + calculateNpcStatModifiers(iter->first, duration); if (timerUpdateEquippedLight == 0)