CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <[EMAIL PROTECTED]> 04/09/26 22:14:52
Modified files:
src : playturn.cpp
Log message:
Hopefully it should fix the gold and loadgame problem
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playturn.cpp.diff?tr1=1.271&tr2=1.272&r1=text&r2=text
Patches:
Index: wesnoth/src/playturn.cpp
diff -u wesnoth/src/playturn.cpp:1.271 wesnoth/src/playturn.cpp:1.272
--- wesnoth/src/playturn.cpp:1.271 Sun Sep 26 18:58:18 2004
+++ wesnoth/src/playturn.cpp Sun Sep 26 22:14:52 2004
@@ -1,4 +1,4 @@
-/* $Id: playturn.cpp,v 1.271 2004/09/26 18:58:18 ettin Exp $ */
+/* $Id: playturn.cpp,v 1.272 2004/09/26 22:14:52 silene Exp $ */
/*
Copyright (C) 2003 by David White <[EMAIL PROTECTED]>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1504,7 +1504,13 @@
write_game(state_of_game_,start,WRITE_SNAPSHOT_ONLY);
- start["gold"] = "-1000000"; //just make sure gold is read in from the
teams
+ // Clobber gold values to make sure the snapshot uses the values
+ // in [side] instead.
+ const config::child_list& players=start.get_children("player");
+ for(config::child_list::const_iterator pi=players.begin();
+ pi!=players.end(); ++pi) {
+ (**pi)["gold"] = "-1000000";
+ }
//write out the current state of the map
start["map_data"] = map_.write();