[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src playturn.cpp |
Date: |
Sun, 26 Sep 2004 18:21:19 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 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 <address@hidden>
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();
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, Isaac Clerencia, 2004/09/16
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, Cedric Duval, 2004/09/17
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, Guillaume Melquiond, 2004/09/26
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, Jordą Polo, 2004/09/26
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp,
Guillaume Melquiond <=
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, Guillaume Melquiond, 2004/09/28
- [Wesnoth-cvs-commits] wesnoth/src playturn.cpp, David White, 2004/09/30