mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 09:45:32 +00:00
Don't tick effects when duration is zero
This commit is contained in:
parent
78a733a12c
commit
4af376133b
1 changed files with 9 additions and 6 deletions
|
@ -486,6 +486,8 @@ namespace MWMechanics
|
||||||
|
|
||||||
bool wasDead = creatureStats.isDead();
|
bool wasDead = creatureStats.isDead();
|
||||||
|
|
||||||
|
if (duration > 0)
|
||||||
|
{
|
||||||
for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
|
for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it)
|
||||||
{
|
{
|
||||||
// tickable effects (i.e. effects having a lasting impact after expiry)
|
// tickable effects (i.e. effects having a lasting impact after expiry)
|
||||||
|
@ -495,6 +497,7 @@ namespace MWMechanics
|
||||||
CastSpell cast(ptr, ptr);
|
CastSpell cast(ptr, ptr);
|
||||||
cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude());
|
cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// attributes
|
// attributes
|
||||||
for(int i = 0;i < ESM::Attribute::Length;++i)
|
for(int i = 0;i < ESM::Attribute::Length;++i)
|
||||||
|
|
Loading…
Reference in a new issue