1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 21:49:55 +00:00

Don't applyInstantEffect when magnitude is zero

This commit is contained in:
scrawl 2015-12-15 20:46:05 +01:00
parent 4af376133b
commit 375caf037d

View file

@ -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());
}
}
}