summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/l_dgnbld.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-05-12 18:37:12 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-05-12 18:46:45 -0600
commit087ac9f5ba5dd190e31d54237db20939ec4ba705 (patch)
tree7306eaf7e645db6b50f1d74a3cbf338b1d335c68 /crawl-ref/source/l_dgnbld.cc
parente7378b289fb56e66c430d4611a0b363088243648 (diff)
downloadcrawl-ref-087ac9f5ba5dd190e31d54237db20939ec4ba705.tar.gz
crawl-ref-087ac9f5ba5dd190e31d54237db20939ec4ba705.zip
Some experimental changes to layout_rooms.
Namley, the rooms aren't necessarily rectangular, and the corridors aren't straight angles any more. I've re-enabled the layout in Elf with a stipulation that the rooms aren't rectangular to see how it performs without them.
Diffstat (limited to 'crawl-ref/source/l_dgnbld.cc')
-rw-r--r--crawl-ref/source/l_dgnbld.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/crawl-ref/source/l_dgnbld.cc b/crawl-ref/source/l_dgnbld.cc
index 668fb2cada..7936dc1657 100644
--- a/crawl-ref/source/l_dgnbld.cc
+++ b/crawl-ref/source/l_dgnbld.cc
@@ -598,16 +598,19 @@ LUAFN(dgn_join_the_dots)
if (at == to)
break;
- if (at.x < to.x)
+ if (at.y == to.y || coinflip())
{
- at.x++;
- continue;
- }
+ if (at.x < to.x)
+ {
+ at.x++;
+ continue;
+ }
- if (at.x > to.x)
- {
- at.x--;
- continue;
+ if (at.x > to.x)
+ {
+ at.x--;
+ continue;
+ }
}
if (at.y > to.y)