only load the test scenarios when we're in test mode

This commit is contained in:
Gunter Labes 2009-04-19 21:07:47 +00:00
parent 2630325c37
commit 7521ea90e3
2 changed files with 8 additions and 7 deletions

View file

@ -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]

View file

@ -649,14 +649,11 @@ bool game_controller::play_test()
state_.campaign_type = "test";
state_.scenario = test_scenario_;
state_.campaign_define = "TEST";
cache_.clear_defines();
cache_.add_define("TEST");
try {
load_game_cfg();
} catch(config::error&) {
cache_.clear_defines();
load_game_cfg();
return false;
}
load_game_cfg();
try {
upload_log nolog(false);