[Wesnoth-cvs-commits] wesnoth/src game_events.cpp (February 21, 2005 - 01:28)

 

CVSROOT:	/cvsroot/wesnoth
Module name:	wesnoth
Branch: 	
Changes by:	David White <Sirp@xxxxxxxxxxxxxxxx>	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 <davidnwhite@xxxxxxxxxxxxxxx>
    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);
+			}
 		}
 	}
 



You are on the gna.org mail server.

Generated by mhonarc, Tue Sep 20 16:46:54 2005