[wesnoth-commits] [wesnoth/wesnoth] 1315eb: Fix #3650: rare crash in attack prediction
GitHub
noreply at github.com
Wed Oct 24 18:59:03 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 1315ebf2a2c123c79bcdb288ac55620a8fc3a7e3
https://github.com/wesnoth/wesnoth/commit/1315ebf2a2c123c79bcdb288ac55620a8fc3a7e3
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-10-24 (Wed, 24 Oct 2018)
Changed paths:
M src/attack_prediction.cpp
Log Message:
-----------
Fix #3650: rare crash in attack prediction
The calculation for the probability to be slowed was incorrect if both
units had slow and neither of them was slowed. Calculating the sum of all
probabilities in the "not hit" row/column is a valid approach: however,
if the unit itself can slow and the other unit isn't already slowed, then
some of the "not hit" cases end up into a different plane.
Probabilities from that plane are now counted as well.
**NOTE:** This service has 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