From 32a53682418ec9732eb25d013aaa9ae06c798cbc Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 28 Jan 2020 10:22:15 +0100 Subject: [PATCH] generateAlts: fixed generation in some geometries --- bigstuff.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bigstuff.cpp b/bigstuff.cpp index f03b200d..54adbf33 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -204,14 +204,20 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special // check for direction int gdir = -1; for(int i=0; itype; i++) { - if(c->move(i) && c->move(i)->mpdist < c->mpdist) gdir = i; + if(!reg3::geometry_has_tree_structure()) { + if(c->move(i) && c->move(i)->mpdist < c->mpdist) gdir = i; + } + else { + /* mpdist may be incorrect */ + if(c->move(i) && c->move(i)->master->distance < c->master->distance) gdir = i; + } } if(gdir < 0) return NULL; // non-crossing in weird hyperbolic if(weirdhyperbolic) { if(c->bardir == NOBARRIERS) return NULL; - forCellEx(c1, c) if(c1->bardir == NOBARRIERS) return NULL; + forCellCM(c1, c) if(c1->bardir == NOBARRIERS) return NULL; if(IRREGULAR) for(int i=0; imaster, i)->c7->bardir != NODIR) @@ -227,7 +233,6 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special // okay, let's go then! cellwalker bf(c, gdir); - if(PURE) bf += rev; std::vector cx(rad+1); for(int i=0; i