wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src playturn.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src playturn.cpp
Date: Thu, 30 Sep 2004 20:20:53 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/10/01 00:13:47

Modified files:
        src            : playturn.cpp 

Log message:
        fixed bug in 'show enemy moves'

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.274&tr2=1.275&r1=text&r2=text

Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.274 wesnoth/src/playturn.cpp:1.275
--- wesnoth/src/playturn.cpp:1.274      Tue Sep 28 19:26:01 2004
+++ wesnoth/src/playturn.cpp    Fri Oct  1 00:13:47 2004
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.274 2004/09/28 19:26:01 silene Exp $ */
+/* $Id: playturn.cpp,v 1.275 2004/10/01 00:13:47 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -2320,14 +2320,15 @@
        all_paths_ = paths();
        
        // Compute enemy movement positions
-       for(unit_map::const_iterator u = units_.begin(); u != units_.end(); 
++u) {
+       for(unit_map::iterator u = units_.begin(); u != units_.end(); ++u) {
                if(current_team().is_enemy(u->second.side()) && 
!gui_.fogged(u->first.x,u->first.y) && !u->second.stone()) {
+                       const unit_movement_resetter move_reset(u->second);
                        const bool is_skirmisher = 
u->second.type().is_skirmisher();
                        const bool teleports = u->second.type().teleports();
                        unit_map units;
                        units.insert(*u);
                        const paths& path = 
paths(map_,status_,gameinfo_,ignore_units?units:units_,
-                                                                         
u->first,teams_,is_skirmisher,teleports,1);
+                                                                         
u->first,teams_,is_skirmisher,teleports);
                        
                        for (paths::routes_map::const_iterator route = 
path.routes.begin(); route != path.routes.end(); ++route) {
                                // map<...>::operator[](const key_type& key) 
inserts key into




reply via email to

[Prev in Thread] Current Thread [Next in Thread]