mail[Wesnoth-commits] r37163 - in /trunk/src: gamestatus.cpp playsingle_controller.cpp


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

Header


Content

Posted by e0204097 on July 22, 2009 - 17:40:
Author: euschn
Date: Wed Jul 22 17:40:14 2009
New Revision: 37163

URL: http://svn.gna.org/viewcvs/wesnoth?rev=37163&view=rev
Log:
simplified storing of carryover information in game_state.snapshot

Modified:
    trunk/src/gamestatus.cpp
    trunk/src/playsingle_controller.cpp

Modified: trunk/src/gamestatus.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gamestatus.cpp?rev=37163&r1=37162&r2=37163&view=diff
==============================================================================
--- trunk/src/gamestatus.cpp (original)
+++ trunk/src/gamestatus.cpp Wed Jul 22 17:40:14 2009
@@ -176,10 +176,6 @@
        foreach(const config* snapshot_side, 
gamestate.snapshot.get_children("side")) {
                cfg.add_child("player", *snapshot_side);
        }
-       //add the remaining player tags
-       foreach(const config* snapshot_player, 
gamestate.snapshot.get_children("player")) {
-               cfg.add_child("player", *snapshot_player);
-       }
 }
 
 game_state::game_state(const config& cfg, bool show_replay) :

Modified: trunk/src/playsingle_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playsingle_controller.cpp?rev=37163&r1=37162&r2=37163&view=diff
==============================================================================
--- trunk/src/playsingle_controller.cpp (original)
+++ trunk/src/playsingle_controller.cpp Wed Jul 22 17:40:14 2009
@@ -860,7 +860,7 @@
        foreach (const config* player_cfg, 
gamestate_.starting_pos.get_children("player")) {
                if (side_ids.count((*player_cfg)["save_id"]) == 0) {
                        LOG_NG << "stored inactive side in snapshot:\n" << 
(*player_cfg)["save_id"] << std::endl;
-                       gamestate_.snapshot.add_child("player", 
(*player_cfg));
+                       gamestate_.snapshot.add_child("side", (*player_cfg));
                }
        }
 }




Related Messages


Powered by MHonArc, Updated Wed Jul 22 18:01:01 2009