mail[Wesnoth-commits] r40148 - /trunk/src/game_events.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on December 06, 2009 - 17:01:
Author: silene
Date: Sun Dec  6 17:01:06 2009
New Revision: 40148

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40148&view=rev
Log:
Allowed [terrain] tag to modify borders. (Fix for bug #14819.)

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=40148&r1=40147&r2=40148&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sun Dec  6 17:01:06 2009
@@ -571,11 +571,6 @@
        return map_location(x, y);
 }
 
-static std::vector<map_location> multiple_locs(const vconfig& cfg)
-{
-       return parse_location_range(cfg["x"],cfg["y"]);
-}
-
 namespace {
 
        std::vector<game_events::event_handler> event_handlers;
@@ -1799,7 +1794,7 @@
 
        bool replace_if_failed = utils::string_bool(cfg["replace_if_failed"]);
 
-       foreach (const map_location &loc, multiple_locs(cfg)) {
+       foreach (const map_location &loc, parse_location_range(cfg["x"], 
cfg["y"], true)) {
                change_terrain(loc, terrain, mode, replace_if_failed);
        }
 }
@@ -2546,9 +2541,7 @@
 WML_HANDLER_FUNCTION(capture_village, /*event_info*/, cfg)
 {
        int side_num = lexical_cast_default<int>(cfg["side"]);
-       std::vector<map_location> locs(multiple_locs(cfg));
-
-       foreach (const map_location &loc, multiple_locs(cfg)) {
+       foreach (const map_location &loc, parse_location_range(cfg["x"], 
cfg["y"])) {
                if (resources::game_map->is_village(loc)) {
                        get_village(loc, side_num);
                }




Related Messages


Powered by MHonArc, Updated Sun Dec 06 18:20:09 2009