Author: soliton
Date: Sun Apr 19 23:07:47 2009
New Revision: 35072
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35072&view=rev
Log:
only load the test scenarios when we're in test mode
Modified:
trunk/data/_main.cfg
trunk/src/game.cpp
Modified: trunk/data/_main.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/_main.cfg?rev=35072&r1=35071&r2=35072&view=diff
==============================================================================
--- trunk/data/_main.cfg (original)
+++ trunk/data/_main.cfg Sun Apr 19 23:07:47 2009
@@ -15,11 +15,15 @@
name="wesnoth-editor"
[/textdomain]
#endif
+
+#ifdef TEST
{scenario-test.cfg}
{scenario-formula.cfg}
{scenario-formula-recruitment.cfg}
{scenario-poisoning.cfg}
{ai/scenarios/scenario-AI_Arena_small.cfg}
+#endif
+
[textdomain]
name="wesnoth"
[/textdomain]
Modified: trunk/src/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game.cpp?rev=35072&r1=35071&r2=35072&view=diff
==============================================================================
--- trunk/src/game.cpp (original)
+++ trunk/src/game.cpp Sun Apr 19 23:07:47 2009
@@ -649,14 +649,11 @@
state_.campaign_type = "test";
state_.scenario = test_scenario_;
-
- try {
- load_game_cfg();
- } catch(config::error&) {
- cache_.clear_defines();
- load_game_cfg();
- return false;
- }
+ state_.campaign_define = "TEST";
+ cache_.clear_defines();
+ cache_.add_define("TEST");
+
+ load_game_cfg();
try {
upload_log nolog(false);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits