From 572786bff27e270b9666bc86d64990101998ceb8 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 14 Dec 2015 03:27:49 +0100 Subject: [PATCH] Instant effects that were added by a permanent ability are applied every frame Via http://forum.openmw.org/viewtopic.php?f=2&t=3212&p=36120#p36121 --- apps/openmw/mwmechanics/actors.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index c4cd8ee4b9..185364fae7 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -486,11 +486,14 @@ namespace MWMechanics bool wasDead = creatureStats.isDead(); - // tickable effects (i.e. effects having a lasting impact after expiry) - // these effects can be applied as "instant" (handled in spellcasting.cpp) or with a duration, handled here for (MagicEffects::Collection::const_iterator it = effects.begin(); it != effects.end(); ++it) { + // tickable effects (i.e. effects having a lasting impact after expiry) effectTick(creatureStats, ptr, it->first, it->second.getMagnitude() * duration); + + // instant effects are already applied on spell impact in spellcasting.cpp, but may also come from permanent abilities + CastSpell cast(ptr, ptr); + cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude()); } // attributes