1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-22 21:40:42 +00:00

Magic effects are updated once before applying when resting

Fixing #7970.
When the player was resting, all their magic effects were applied throughout
the rest duration, including the effects for already removed spells, which
were applied once more before removal.
This commit calls an update before that applying, so that these removed
spells are executed and removed and only then the real duration-long
execution of remaining magic effects takes place.
This commit is contained in:
trav5 2024-05-13 21:41:41 +02:00
parent 88bd898e6b
commit 238d68b691
2 changed files with 4 additions and 0 deletions

View File

@ -172,6 +172,7 @@
Bug #7901: Editor: Teleport-related fields shouldn't be editable if a ref does not teleport
Bug #7908: Key bindings names in the settings menu are layout-specific
Bug #7943: Using "addSoulGem" and "dropSoulGem" commands to creatures works only with "Weapon & Shield" flagged ones
Bug #7970: Difference of GetPCSleep (?) behavior between vanilla and OpenMW
Feature #2566: Handle NAM9 records for manual cell references
Feature #3537: Shader-based water ripples
Feature #5173: Support for NiFogProperty

View File

@ -1879,6 +1879,9 @@ namespace MWMechanics
> actorsProcessingRange * actorsProcessingRange)
continue;
// Get rid of effects pending removal so they are not applied when resting
updateMagicEffects(actor.getPtr());
adjustMagicEffects(actor.getPtr(), duration);
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(actor.getPtr());