diff --git a/bigstuff.cpp b/bigstuff.cpp index 7478366e..9332718a 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -207,9 +207,9 @@ void hrmap::generateAlts(heptagon *h, int levs, bool link_cdata) { #if MAXMDIM >= 4 EX int hrandom_adjacent(cellwalker cw) { - auto& da = currentmap->adjacent_dirs(cw); + auto& da = currentmap->dirdist(cw); vector choices = {cw.spin}; - for(int a=0; atype; a++) if(da[a] == 1) choices.push_back(a); return hrand_elt(choices, cw.spin); } #endif @@ -696,15 +696,15 @@ EX void buildEquidistant(cell *c) { if(!cw.at->landflags) continue; if(S7 == 6) c->landflags = 1; else { - auto& da = currentmap->adjacent_dirs(cw); - for(int j=0; jmove(j) && cw.at->move(j)->landparam == c->landparam - 2 && !da[j]) + auto& da = currentmap->dirdist(cw); + for(int j=0; jmove(j) && cw.at->move(j)->landparam == c->landparam - 2 && da[j] != 1) if(c->landparam == 2 ? cw.at->move(j)->land != laEndorian : cw.at->move(j)->landparam) c->landflags = 1; } } } else if(c->landparam == 2) { - for(int i=0; itype; i++) { cellwalker cw(c, i); if(!cw.peek()) continue; cw += wstep; @@ -715,7 +715,7 @@ EX void buildEquidistant(cell *c) { } } else if(c->landparam % 2 == 1) { - for(int i=0; itype; i++) { cellwalker cw(c, i); if(!cw.peek()) continue; cw += wstep; @@ -723,14 +723,14 @@ EX void buildEquidistant(cell *c) { if(!cw.at->landflags) continue; if(S7 == 6) c->landflags = 1; else { - auto& da = currentmap->adjacent_dirs(cw); - for(int j=0; jmove(j) && cw.at->move(j)->landparam == c->landparam - 2 && !da[j] && cw.at->move(j)->landflags) + auto& da = currentmap->dirdist(cw); + for(int j=0; jmove(j) && cw.at->move(j)->landparam == c->landparam - 2 && da[j] != 1 && cw.at->move(j)->landflags) c->landflags = 1; } } } else { - for(int i=0; itype; i++) { cellwalker cw(c, i); if(!cw.peek()) continue; cw += wstep; diff --git a/cell.cpp b/cell.cpp index fd412256..3698f342 100644 --- a/cell.cpp +++ b/cell.cpp @@ -531,6 +531,7 @@ EX int celldistAlt(cell *c) { if(IRREGULAR) return irr::celldist(c, true); #endif if(ctof(c)) return c->master->alt->distance; + if(reg3::in()) return c->master->alt->distance; #if CAP_GP if(GOLDBERG) return gp::compute_dist(c, celldistAlt); if(INVERSE) { diff --git a/landgen.cpp b/landgen.cpp index d1e77197..ae392a4c 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -199,7 +199,7 @@ EX bool is_zebra_trapdoor(cell *c) { return false; } case gSpace435: { - for(int i=0; itype; i++) { cellwalker cw(c, i); for(int a=0; a<3; a++) { if(cw.at->master->fieldval == 0) return true;