Author: alink
Date: Wed Oct 31 22:14:34 2007
New Revision: 21371

URL: http://svn.gna.org/viewcvs/wesnoth?rev=21371&view=rev
Log:
Fix of-by-one "turn to reach" when showing path of a unit if it's not its turn

Modified:
    trunk/src/mouse_events.cpp

Modified: trunk/src/mouse_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/mouse_events.cpp?rev=21371&r1=21370&r2=21371&view=diff
==============================================================================
--- trunk/src/mouse_events.cpp (original)
+++ trunk/src/mouse_events.cpp Wed Oct 31 22:14:34 2007
@@ -833,6 +833,9 @@
                   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(&current_route_);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to