diff --git a/CHANGELOG.md b/CHANGELOG.md index a131fe05d..c30663a87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Bug #4813: Creatures with known file but no "Sound Gen Creature" assigned use default sounds Bug #4820: Spell absorption is broken Bug #4827: NiUVController is handled incorrectly + Bug #4828: Potion looping effects VFX are not shown for NPCs 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 4166ece11..7e2c6cd8e 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -1355,6 +1355,14 @@ namespace MWMechanics bool cellChanged = world->hasCellChanged(); MWWorld::Ptr actor = iter->first; // make a copy of the map key to avoid it being invalidated when the player teleports updateActor(actor, duration); + + // Looping magic VFX update + // Note: we need to do this before any of the animations are updated. + // Reaching the text keys may trigger Hit / Spellcast (and as such, particles), + // so updating VFX immediately after that would just remove the particle effects instantly. + // There needs to be a magic effect update in between. + ctrl->updateContinuousVfx(); + if (!cellChanged && world->hasCellChanged()) { return; // for now abort update of the old cell when cell changes by teleportation magic effect @@ -1428,14 +1436,6 @@ namespace MWMechanics timerUpdateEquippedLight += duration; mTimerDisposeSummonsCorpses += duration; - // Looping magic VFX update - // Note: we need to do this before any of the animations are updated. - // Reaching the text keys may trigger Hit / Spellcast (and as such, particles), - // so updating VFX immediately after that would just remove the particle effects instantly. - // There needs to be a magic effect update in between. - for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter) - iter->second->getCharacterController()->updateContinuousVfx(); - // Animation/movement update CharacterController* playerCharacter = nullptr; for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)