Skip to content

Commit

Permalink
Fix bug #22116: unlock movement when attacking enemy+discovering in fog
Browse files Browse the repository at this point in the history
  • Loading branch information
Coffee-- committed May 31, 2014
1 parent 6deda4c commit d7ba99a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelog
Expand Up @@ -168,6 +168,7 @@ Version 1.13.0-dev:
* Fix bug #21397 Reloading may cause a side's turn is not initalized.
This bug affected only networked mp, at least since version 1.8.
* [modify_side] may now alter the value of [side] defeat_condition.
* Fix bug #22116: unlock movement when attacking enemy+discovering in fog

Version 1.11.11:
* Add-ons server:
Expand Down
13 changes: 9 additions & 4 deletions src/mouse_events.cpp
Expand Up @@ -609,21 +609,26 @@ void mouse_handler::move_action(bool browse)
if (resources::whiteboard->is_active()) {
save_whiteboard_attack(attack_from, hex, choice);
}
else if ( move_unit_along_current_route() ) {
else {
bool not_interrupted = move_unit_along_current_route();
bool alt_unit_selected = (selected_hex_ != src);
src = selected_hex_;
// clear current unit selection so that any other unit selected
// triggers a new selection
selected_hex_ = map_location();

attack_enemy(attack_from, hex, choice); // Fight !!
if (not_interrupted)
attack_enemy(attack_from, hex, choice); // Fight !!

//TODO: Maybe store the attack choice so "press t to continue"
// can also continue the attack?

if (alt_unit_selected && !selected_hex_.valid()) {
//reselect other unit if selected during movement animation
select_hex(src, browse);
}
}
//TODO: Maybe store the attack choice so "press t to continue"
// can also continue the attack?

return;
}
}
Expand Down

0 comments on commit d7ba99a

Please sign in to comment.