mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Apply effects during rest before fast-forwarding spells state
This commit is contained in:
parent
53e581fe10
commit
787ca06d55
@ -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…
x
Reference in New Issue
Block a user