Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zero division in enchantment magnitude calculation #2326

Merged
merged 1 commit into from
Apr 14, 2019

Conversation

Capostrophic
Copy link
Collaborator

This zero division led to constant magnitude effects of enchanted items being not only unable to work, but also make the relevant stats of the character 0 or worse. Oops.

Now random multiplier is only calculated if the delta is not 0, like for constant abilities. It should be initialized as zero otherwise and the item will use the minimum magnitude in the result, which is what we want.

@akortunov akortunov merged commit d115288 into OpenMW:master Apr 14, 2019
@Capostrophic Capostrophic deleted the regression branch April 14, 2019 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants