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

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

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


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src game_events.cpp
Date: Sun, 20 Feb 2005 18:55:06 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/02/20 23:55:06

Modified files:
        src            : game_events.cpp 

Log message:
        make [capture_village] capable of accepting a location range

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

Patches:
Index: wesnoth/src/game_events.cpp
diff -u wesnoth/src/game_events.cpp:1.119 wesnoth/src/game_events.cpp:1.120
--- wesnoth/src/game_events.cpp:1.119   Sun Feb 20 21:45:21 2005
+++ wesnoth/src/game_events.cpp Sun Feb 20 23:55:06 2005
@@ -1,4 +1,4 @@
-/* $Id: game_events.cpp,v 1.119 2005/02/20 21:45:21 silene Exp $ */
+/* $Id: game_events.cpp,v 1.120 2005/02/20 23:55:06 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1208,10 +1208,12 @@
                //the village will become neutral.
                const size_t team_num = size_t(side-1);
 
-               const gamemap::location loc(cfg);
-
-               if(game_map->is_village(loc)) {
-                       get_village(loc,*teams,team_num,*units);
+               const std::vector<gamemap::location> locs(multiple_locs(cfg));
+
+               for(std::vector<gamemap::location>::const_iterator i = 
locs.begin(); i != locs.end(); ++i) {
+                       if(game_map->is_village(*i)) {
+                               get_village(*i,*teams,team_num,*units);
+                       }
                }
        }
 




reply via email to

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