Fix of-by-one "turn to reach" when showing path of a unit if it's not its turn
This commit is contained in:
parent
1fa9e702b7
commit
136d010cbb
1 changed files with 3 additions and 0 deletions
|
@ -833,6 +833,9 @@ void mouse_handler::mouse_motion(int x, int y, const bool browse, bool update)
|
|||
map_.on_board(new_hex)) {
|
||||
|
||||
if(selected_unit != units_.end() && !selected_unit->second.incapacitated()) {
|
||||
// the movement_reset is active only if it's not the unit's turn
|
||||
unit_movement_resetter move_reset(selected_unit->second,
|
||||
selected_unit->second.side() != team_num_);
|
||||
current_route_ = get_route(selected_unit, dest, teams_[selected_unit->second.side()-1]);
|
||||
if(!browse) {
|
||||
(*gui_).set_route(¤t_route_);
|
||||
|
|
Loading…
Add table
Reference in a new issue