From 375caf037d48c1b401547cee5aa9dee972dd3600 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 15 Dec 2015 20:46:05 +0100 Subject: [PATCH] Don't applyInstantEffect when magnitude is zero --- 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 58fedf2fd9..ed6ace57d5 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -494,8 +494,11 @@ namespace MWMechanics 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()); + if (it->second.getMagnitude() > 0) + { + CastSpell cast(ptr, ptr); + cast.applyInstantEffect(ptr, ptr, it->first, it->second.getMagnitude()); + } } }