mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
Merge pull request #2999 from akortunov/spellfix
Apply effects during rest before fast-forwarding spells state
This commit is contained in:
commit
dd7e964baf
1 changed files with 5 additions and 3 deletions
|
@ -2053,10 +2053,11 @@ namespace MWMechanics
|
|||
|
||||
for(PtrActorMap::iterator iter(mActors.begin()); iter != mActors.end(); ++iter)
|
||||
{
|
||||
iter->first.getClass().getCreatureStats(iter->first).getActiveSpells().update(duration);
|
||||
|
||||
if (iter->first.getClass().getCreatureStats(iter->first).isDead())
|
||||
{
|
||||
iter->first.getClass().getCreatureStats(iter->first).getActiveSpells().update(duration);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sleep || iter->first == player)
|
||||
restoreDynamicStats(iter->first, hours, sleep);
|
||||
|
@ -2073,13 +2074,14 @@ namespace MWMechanics
|
|||
if (iter->first.getClass().isNpc())
|
||||
calculateNpcStatModifiers(iter->first, duration);
|
||||
|
||||
iter->first.getClass().getCreatureStats(iter->first).getActiveSpells().update(duration);
|
||||
|
||||
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(iter->first);
|
||||
if (animation)
|
||||
{
|
||||
animation->removeEffects();
|
||||
MWBase::Environment::get().getWorld()->applyLoopingParticles(iter->first);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fastForwardAi();
|
||||
|
|
Loading…
Reference in a new issue