summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-12-27 18:23:31 +0300
committerVsevolod Kozlov <zaba@thorium.homeunix.org>2009-12-27 18:24:21 +0300
commitfa0307d3451bef981c807759f956b0de01d5485f (patch)
treee37848de5653226dba3187f977d789261cf2a669 /crawl-ref/source/dungeon.cc
parentcaad029e611bb2eeedcab049d624a9e2be4e0dd5 (diff)
downloadcrawl-ref-fa0307d3451bef981c807759f956b0de01d5485f.tar.gz
crawl-ref-fa0307d3451bef981c807759f956b0de01d5485f.zip
dungeon.cc: Kill a small piece of code duplication in special room handling.
Hopefully I've got the logic inversion right...
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index c5f6a788ca..61b09b2717 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -7346,12 +7346,11 @@ static void _roguey_level(int level_number, spec_room &sr, bool make_stairs)
// Is one of them a special room?
const map_def *sroom = NULL;
-#ifdef DEBUG_SPECIAL_ROOMS
- if ((sroom = random_map_for_tag("special_room", true)) != NULL)
-#else
- if (one_chance_in(10)
- && (sroom = random_map_for_tag("special_room", true)) != NULL)
+ if (
+#ifndef DEBUG_SPECIAL_ROOMS
+ one_chance_in(10) &&
#endif
+ (sroom = random_map_for_tag("special_room", true)) != NULL)
{
int spec_room_done = random2(25);