Author: soliton
Date: Mon Apr 20 00:25:36 2009
New Revision: 35074

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35074&view=rev
Log:
only load the test scenarios when we're in test mode

Modified:
    branches/1.6/data/_main.cfg
    branches/1.6/src/game.cpp

Modified: branches/1.6/data/_main.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/data/_main.cfg?rev=35074&r1=35073&r2=35074&view=diff
==============================================================================
--- branches/1.6/data/_main.cfg (original)
+++ branches/1.6/data/_main.cfg Mon Apr 20 00:25:36 2009
@@ -15,9 +15,13 @@
     name="wesnoth-editor"
 [/textdomain]
 #endif
+
+#ifdef TEST
 {scenario-test.cfg}
 {scenario-formula.cfg}
 {scenario-formula-recruitment.cfg}
+#endif
+
 [textdomain]
     name="wesnoth"
 [/textdomain]

Modified: branches/1.6/src/game.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/game.cpp?rev=35074&r1=35073&r2=35074&view=diff
==============================================================================
--- branches/1.6/src/game.cpp (original)
+++ branches/1.6/src/game.cpp Mon Apr 20 00:25:36 2009
@@ -638,14 +638,13 @@
 
        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();
+
+       paths_manager_.set_paths(game_config_);
 
        try {
                upload_log nolog(false);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to