From bf8323686304cab771b1741106f4f3f44197ff73 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 12 Oct 2017 11:39:22 +0200 Subject: [PATCH] fixed a refactoring bug in Caribbean generation --- landgen.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/landgen.cpp b/landgen.cpp index efe7b447..52f3a761 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -1181,25 +1181,27 @@ void giantLandSwitch(cell *c, int d, cell *from) { break; case laCaribbean: - if(d == 9 && !euclid) { - if(c->master->alt && c->master->alt->distance <= 2) { - if(!euclid) generateAlts(c->master); - preventbarriers(c); + if(d == 9) { + if(!euclid) { + if(c->master->alt && c->master->alt->distance <= 2) { + if(!euclid) generateAlts(c->master); + preventbarriers(c); + int d = celldistAlt(c); + if(d <= 0) + // c->wall = waChasm; + generateTreasureIsland(c); + else + c->wall = waSea; + } + else c->wall = waSea; + } + else { int d = celldistAlt(c); if(d <= 0) - // c->wall = waChasm; generateTreasureIsland(c); else c->wall = waSea; } - else c->wall = waSea; - } - else { - int d = celldistAlt(c); - if(d <= 0) - generateTreasureIsland(c); - else - c->wall = waSea; } if(d == 8 && !euclid) { int mindist = 9;