diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-26 20:18:06 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-26 20:37:12 -0600 |
commit | 563cca605a211b23f7f5b7e949a160af522c9f61 (patch) | |
tree | 1546796b3a9598854fbffdc04c562981d9d6766b /crawl-ref/source/abyss.cc | |
parent | 2122dce6c8e6ca91c0afdb1197821f57a0b4c792 (diff) | |
download | crawl-ref-563cca605a211b23f7f5b7e949a160af522c9f61.tar.gz crawl-ref-563cca605a211b23f7f5b7e949a160af522c9f61.zip |
Try harder to place abyss rune vaults.
The backup code for placing the rune on its own isn't gone yet, but it
should be needed considerably less now.
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r-- | crawl-ref/source/abyss.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index 7a7eadd9c6..5fc5e75d7a 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -240,10 +240,15 @@ static bool _abyss_place_rune_vault(const map_bitmask &abyss_genlevel_mask) // Make sure we're not about to link bad items. debug_item_scan(); - const bool result = _abyss_place_vault_tagged(abyss_genlevel_mask, - "abyss_rune"); + bool result = false; + int tries = 10; + do + result = _abyss_place_vault_tagged(abyss_genlevel_mask, "abyss_rune"); + while (!result && --tries); // Make sure the rune is linked. + // XXX: I'm fairly sure this does nothing if result == false, + // but leaving it alone for now. -- Grunt _abyss_postvault_fixup(); return result; } |