only load the test scenarios when we're in test mode
This commit is contained in:
parent
2630325c37
commit
7521ea90e3
2 changed files with 8 additions and 7 deletions
|
@ -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]
|
||||
|
|
11
src/game.cpp
11
src/game.cpp
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue