Merge pull request #2150 from akortunov/vfx

Update magic effects VFX immediately after effects update
pull/541/head
Bret Curtis 6 years ago committed by GitHub
commit 4f938492e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save