[wesnoth-commits] [wesnoth/wesnoth] 00e58f: Unit Attack: fixed issues arising from displayed i...
GitHub
noreply at github.com
Fri Jun 8 16:34:38 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 00e58f12f9a57b2e25dd4f67efb1255b177e173b
https://github.com/wesnoth/wesnoth/commit/00e58f12f9a57b2e25dd4f67efb1255b177e173b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-06-09 (Sat, 09 Jun 2018)
Changed paths:
M changelog.md
M src/gui/dialogs/unit_attack.cpp
M src/mouse_events.cpp
Log Message:
-----------
Unit Attack: fixed issues arising from displayed items potentially not equally available items
Since there were weapons included that weren't shown, it was possible for the best
weapon selection to be a hidden one (in which case, the initial selection would be
wrong, and it was possible for the returned index to point to a hidden, disabled
weapon.
This resolves both issues by excluding these disabled attacks from the weapon choices
list altogether. They aren't considered when calculating the best attack either.
mouse_handler::fill_weapon_choices is also used in mouse_handler::attack_enemy_, but
I don't foresee this change should cause any issues there, since you aren't supposed
to be able to actually attack with disabled weapons anyway.
**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