diff --git a/bigstuff.cpp b/bigstuff.cpp index f3c4358b..127c7403 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -226,7 +226,8 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) { alt->alt = alt; alt->cdata = (cdata*) h; alt->distance = dist; - h->alt = alt; + vector> altpairs; + altpairs.emplace_back(h, alt); altmap::relspin(alt) = dir; horodisk_land[alt] = next; @@ -236,6 +237,8 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) { auto alt1 = createStep(alt, 0); alt1->alt = alt->alt; auto h1 = createStep(h, dir); + if(h1->alt) return; + altpairs.emplace_back(h1, alt1); h1->alt = alt1; auto dir_alt = alt->c.spin(0); @@ -245,8 +248,11 @@ void new_voronoi_root(heptagon *h, int dist, int dir, eLand next, eLand last) { h = h1; alt = alt1; } + + for(auto p: altpairs) p.first->alt = p.second; } + struct cand_info { int best, bqty; heptagon *candidate;