forked from teamnwah/openmw-tes3coop
Simplify getEffectMultiplier.
Both return cases were same, except for some overflow conditions.
This commit is contained in:
parent
cd7cc4bec9
commit
663647bee8
1 changed files with 1 additions and 4 deletions
|
@ -246,10 +246,7 @@ namespace MWMechanics
|
||||||
const ESM::Spell* spell, const MagicEffects* effects)
|
const ESM::Spell* spell, const MagicEffects* effects)
|
||||||
{
|
{
|
||||||
float resistance = getEffectResistance(effectId, actor, caster, spell, effects);
|
float resistance = getEffectResistance(effectId, actor, caster, spell, effects);
|
||||||
if (resistance >= 0)
|
|
||||||
return 1 - resistance / 100.f;
|
return 1 - resistance / 100.f;
|
||||||
else
|
|
||||||
return -(resistance-100) / 100.f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if the given affect can be applied to the target. If \a castByPlayer, emits a message box on failure.
|
/// Check if the given affect can be applied to the target. If \a castByPlayer, emits a message box on failure.
|
||||||
|
|
Loading…
Reference in a new issue