[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src playlevel.cpp
From: |
David White |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src playlevel.cpp |
Date: |
Sat, 01 Jan 2005 18:06:44 -0500 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/01/01 22:55:00
Modified files:
src : playlevel.cpp
Log message:
made calculations showing gold held for next scenario only appear if
there is a next scenario
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/playlevel.cpp.diff?tr1=1.165&tr2=1.166&r1=text&r2=text
Patches:
Index: wesnoth/src/playlevel.cpp
diff -u wesnoth/src/playlevel.cpp:1.165 wesnoth/src/playlevel.cpp:1.166
--- wesnoth/src/playlevel.cpp:1.165 Sat Dec 4 15:05:32 2004
+++ wesnoth/src/playlevel.cpp Sat Jan 1 22:54:59 2005
@@ -1,4 +1,4 @@
-/* $Id: playlevel.cpp,v 1.165 2004/12/04 15:05:32 silene Exp $ */
+/* $Id: playlevel.cpp,v 1.166 2005/01/01 22:54:59 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -730,7 +730,13 @@
try {
game_events::fire("victory");
} catch(end_level_exception&) {
- }
+ }
+
+ if(state_of_game.scenario == (*level)["id"]) {
+ state_of_game.scenario =
(*level)["next_scenario"];
+ }
+
+ const bool has_next_scenario = state_of_game.scenario
!= "null" && state_of_game.scenario != "";
//add all the units that survived the scenario
for(std::map<gamemap::location,unit>::iterator un =
units.begin(); un != units.end(); ++un) {
@@ -744,7 +750,7 @@
}
//'continue' is like a victory, except it doesn't
announce victory,
- //and the player returns 100% of gold.
+ //and the player retains 100% of gold.
if(end_level.result == LEVEL_CONTINUE ||
end_level.result == LEVEL_CONTINUE_NO_SAVE) {
for(std::vector<team>::iterator
i=teams.begin(); i!=teams.end(); ++i) {
player_info
*player=state_of_game.get_player(i->save_id());
@@ -801,7 +807,7 @@
gui::show_dialog(gui,NULL,_("Victory"),
_("You have emerged
victorious!"),gui::OK_ONLY);
- if(state_of_game.players.size()>0) {
+ if(state_of_game.players.size()>0 && has_next_scenario)
{
gui::show_dialog(gui,NULL,"",report.str(),gui::OK_ONLY);
}
return VICTORY;
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp,
David White <=
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, Jon Daniel, 2005/01/20
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, Jon Daniel, 2005/01/21
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, Guillaume Melquiond, 2005/01/22
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, David White, 2005/01/24
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, Jordą Polo, 2005/01/28
- [Wesnoth-cvs-commits] wesnoth/src playlevel.cpp, David White, 2005/01/28