[Commits] [wesnoth/wesnoth] 3dac13: Fix rare crash in combat simulation

GitHub noreply at github.com
Sat Dec 31 14:41:42 UTC 2016


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 3dac13ae9e475c36a65eb76195404c525efb7a7d
      https://github.com/wesnoth/wesnoth/commit/3dac13ae9e475c36a65eb76195404c525efb7a7d
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
    M src/attack_prediction.cpp

  Log Message:
  -----------
  Fix rare crash in combat simulation

After predicting fight result with Monte Carlo simulation, it was possible
for the `summary` array and the `slowed` variable to disagree about the
probability of the combatant to be slowed, which resulted in a crash if
another fight was simulated in Monte Carlo mode for the same unit
aftwerwards.


  Commit: 169946fc241f8938247a9112ed7e8a646af5cb10
      https://github.com/wesnoth/wesnoth/commit/169946fc241f8938247a9112ed7e8a646af5cb10
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2016-12-31 (Sat, 31 Dec 2016)

  Changed paths:
    M changelog
    M players_changelog
    M src/attack_prediction.hpp

  Log Message:
  -----------
  Less aggressive use of Monte Carlo simulation

5000 turned out to be a too low threshold: at that complexity score traditional probability calculation is still much faster.


Compare: https://github.com/wesnoth/wesnoth/compare/0f601f72535f...169946fc241f


More information about the Commits mailing list