fix attacks beein wrongly disabled
as said in the comment, that get_special_bool might return the wrong value, as since 5f58cd7c6d
the bc_vector no longer contains disabled attacks we can just remove this code.
fixes #3324
This commit is contained in:
parent
3939d1b202
commit
64e34f26d6
1 changed files with 1 additions and 6 deletions
|
@ -1276,12 +1276,7 @@ int mouse_handler::show_attack_dialog(const map_location& attacker_loc, const ma
|
|||
std::vector<battle_context> bc_vector;
|
||||
const int best = fill_weapon_choices(bc_vector, attacker, defender);
|
||||
|
||||
//TODO: this "disable" check has no attack context.
|
||||
const bool all_disabled = std::all_of(bc_vector.begin(), bc_vector.end(),
|
||||
[](battle_context& context) { return (*context.get_attacker_stats().weapon).get_special_bool("disable"); }
|
||||
);
|
||||
|
||||
if((*attacker).attacks().empty() || all_disabled) {
|
||||
if((*attacker).attacks().empty()) {
|
||||
gui2::show_transient_message("No Attacks", _("This unit has no usable weapons."));
|
||||
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Reference in a new issue