diff options
author | Neil Moore <neil@s-z.org> | 2013-06-17 15:39:38 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2013-06-17 18:24:56 -0400 |
commit | 73208433065059dc514ef060364da7187d01accb (patch) | |
tree | 9298c99381a80f5aa566ec87931ac01fbcfd1435 /crawl-ref/source/arena.cc | |
parent | e76f62175ccfd7f09767912ebf291574b60ae040 (diff) | |
download | crawl-ref-73208433065059dc514ef060364da7187d01accb.tar.gz crawl-ref-73208433065059dc514ef060364da7187d01accb.zip |
Fix arena across restart_after_game (#2962)
The score and number of rounds, the "was cancelled" state, the unique
list, and various arena options were not being reset.
Diffstat (limited to 'crawl-ref/source/arena.cc')
-rw-r--r-- | crawl-ref/source/arena.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/arena.cc b/crawl-ref/source/arena.cc index 3a755ca5ed..0b95c16783 100644 --- a/crawl-ref/source/arena.cc +++ b/crawl-ref/source/arena.cc @@ -907,6 +907,16 @@ namespace arena static void global_setup(const string& arena_teams) { + // Clear some things that shouldn't persist across restart_after_game. + // parse_monster_spec and setup_fight will clear the rest. + total_trials = trials_done = team_a_wins = ties = 0; + contest_canceled = false; + is_respawning = false; + uniques_list.clear(); + memset(banned_glyphs, 0, sizeof(banned_glyphs)); + arena_type = ""; + place = level_id(BRANCH_MAIN_DUNGEON, 20); + // [ds] Turning off view_lock crashes arena. Options.view_lock_x = Options.view_lock_y = true; |