[wesnoth-commits] [wesnoth/wesnoth] ec54b7: Damage prediction: round very close slow probabili...
GitHub
noreply at github.com
Fri Jul 6 19:53:25 UTC 2018
Branch: refs/heads/1.14
Home: https://github.com/wesnoth/wesnoth
Commit: ec54b761bc1868451984c6582cc8a88a57e691de
https://github.com/wesnoth/wesnoth/commit/ec54b761bc1868451984c6582cc8a88a57e691de
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-07-06 (Fri, 06 Jul 2018)
Changed paths:
M src/attack_prediction.cpp
Log Message:
-----------
Damage prediction: round very close slow probabilities to 0 or 1
In the case in bug #3321, damage prediction code somehow receives a
combatant whose probability to be slowed is very close to one of those
values but not quite it. I couldn't figure out how it's possible because
only damage prediction code itself is supposed to emit slow probabilities,
and it's not producing such a probability in this case.
Without more information, I'm simply fixing the bug by force. If the
probability is in the problematic area, we simply round it to 0 or 1. This
way such probabilities are impossible later on when we try to scale the HP
distributions so that they add to 1.
Fixes #3321.
**NOTE:** This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the Commits
mailing list