Do not update drowning state for actors outside of AI distance (bug #4980)

pull/541/head
Andrei Kortunov 6 years ago
parent 4da21942af
commit 6b49ce965b

@ -62,6 +62,7 @@
Bug #4969: "Miss" sound plays for any actor Bug #4969: "Miss" sound plays for any actor
Bug #4972: Player is able to use quickkeys while disableplayerfighting is active Bug #4972: Player is able to use quickkeys while disableplayerfighting is active
Bug #4979: AiTravel maximum range depends on "actors processing range" setting 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 #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis Feature #3610: Option to invert X axis

@ -1539,7 +1539,10 @@ namespace MWMechanics
if(iter->first.getClass().isNpc()) 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); calculateNpcStatModifiers(iter->first, duration);
if (timerUpdateEquippedLight == 0) if (timerUpdateEquippedLight == 0)

Loading…
Cancel
Save