diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-07-26 17:45:00 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-07-26 17:45:00 -0600 |
commit | eac0335949a95aeaab132a3cfa76bb806aacb9e3 (patch) | |
tree | d7c6a9505c45dafa7dacc7882ec0fe46f47768b7 /crawl-ref/source/dungeon.cc | |
parent | 102536e4636e82bde2c4025181bd127c075ee5c4 (diff) | |
download | crawl-ref-eac0335949a95aeaab132a3cfa76bb806aacb9e3.tar.gz crawl-ref-eac0335949a95aeaab132a3cfa76bb806aacb9e3.zip |
Revert "Connect exits of primary vault to layout after building layout."
There's already a ::connect call after build_postvault_level, so this is
completely meaningless logic.
This reverts commit a02710520930951c3f3b6685483d157d3b32bfcb.
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index b620c054d6..d402d3f0e9 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -128,8 +128,6 @@ static bool _connect_spotty(const coord_def& from, static bool _connect_vault_exit(const coord_def& exit); // VAULT FUNCTIONS -static const vault_placement *_primary_vault = NULL; - static const vault_placement * _build_secondary_vault(const map_def *vault, bool check_collisions = true, @@ -2767,8 +2765,6 @@ static bool _pan_level() // to place more vaults after this static bool _builder_by_type() { - _primary_vault = NULL; - if (player_in_branch(BRANCH_LABYRINTH)) { dgn_build_labyrinth_level(); @@ -3290,7 +3286,6 @@ static bool _builder_normal() die("Couldn't pick a layout."); _dgn_ensure_vault_placed(_build_primary_vault(vault), false); - _primary_vault = NULL; return true; } @@ -4274,18 +4269,7 @@ static const vault_placement *_build_secondary_vault(const map_def *vault, // static const vault_placement *_build_primary_vault(const map_def *vault) { - _primary_vault = _build_vault_impl(vault, false, false, true); - return _primary_vault; -} - -static bool _branch_is_spotty() -{ - return player_in_branch(BRANCH_ORC) -#if TAG_MAJOR_VERSION == 34 - || player_in_branch(BRANCH_FOREST) -#endif - || player_in_branch(BRANCH_SWAMP) - || player_in_branch(BRANCH_SLIME); + return _build_vault_impl(vault); } // Builds a vault or minivault. Do not use this function directly: always @@ -4393,7 +4377,15 @@ static const vault_placement *_build_vault_impl(const map_def *vault, } if (!make_no_exits) - place.connect(_branch_is_spotty()); + { + const bool spotty = player_in_branch(BRANCH_ORC) +#if TAG_MAJOR_VERSION == 34 + || player_in_branch(BRANCH_FOREST) +#endif + || player_in_branch(BRANCH_SWAMP) + || player_in_branch(BRANCH_SLIME); + place.connect(spotty); + } // Fire any post-place hooks defined for this map; any failure // here is an automatic veto. Note that the post-place hook must @@ -4432,8 +4424,6 @@ static void _build_postvault_level(vault_placement &place) _build_secondary_vault(layout, false); } } - if (_primary_vault) - _primary_vault->connect(_branch_is_spotty()); } static object_class_type _acquirement_object_class() |