mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 00:36:41 +00:00
Apply effects during rest before fast-forwarding spells state
This commit is contained in:
parent
53e581fe10
commit
787ca06d55
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)
|
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())
|
if (iter->first.getClass().getCreatureStats(iter->first).isDead())
|
||||||
|
{
|
||||||
|
iter->first.getClass().getCreatureStats(iter->first).getActiveSpells().update(duration);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!sleep || iter->first == player)
|
if (!sleep || iter->first == player)
|
||||||
restoreDynamicStats(iter->first, hours, sleep);
|
restoreDynamicStats(iter->first, hours, sleep);
|
||||||
|
@ -2073,13 +2074,14 @@ namespace MWMechanics
|
||||||
if (iter->first.getClass().isNpc())
|
if (iter->first.getClass().isNpc())
|
||||||
calculateNpcStatModifiers(iter->first, duration);
|
calculateNpcStatModifiers(iter->first, duration);
|
||||||
|
|
||||||
|
iter->first.getClass().getCreatureStats(iter->first).getActiveSpells().update(duration);
|
||||||
|
|
||||||
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(iter->first);
|
MWRender::Animation* animation = MWBase::Environment::get().getWorld()->getAnimation(iter->first);
|
||||||
if (animation)
|
if (animation)
|
||||||
{
|
{
|
||||||
animation->removeEffects();
|
animation->removeEffects();
|
||||||
MWBase::Environment::get().getWorld()->applyLoopingParticles(iter->first);
|
MWBase::Environment::get().getWorld()->applyLoopingParticles(iter->first);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fastForwardAi();
|
fastForwardAi();
|
||||||
|
|
Loading…
Reference in a new issue