Add parentheses to clarify calculations

0.6.1
Allofich 8 years ago
parent f299f26720
commit 60a2625b89

@ -171,10 +171,10 @@ void MWMechanics::Alchemy::updateEffects()
if (fPotionT1DurMult<=0)
throw std::runtime_error ("invalid gmst: fPotionT1DurMult");
float magnitude = magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude ?
1 : (x / fPotionT1MagMul) / magicEffect->mData.mBaseCost;
float duration = magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration ?
1 : (x / fPotionT1DurMult) / magicEffect->mData.mBaseCost;
float magnitude = (magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude) ?
1.0f : (x / fPotionT1MagMul) / magicEffect->mData.mBaseCost;
float duration = (magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration) ?
1.0f : (x / fPotionT1DurMult) / magicEffect->mData.mBaseCost;
if (!(magicEffect->mData.mFlags & ESM::MagicEffect::NoMagnitude))
applyTools (magicEffect->mData.mFlags, magnitude);

Loading…
Cancel
Save