fixed buildEquidistant in 3D

This commit is contained in:
Zeno Rogue 2019-03-23 16:27:27 +01:00
parent 02a174b3ca
commit 837ad2695c
1 changed files with 13 additions and 0 deletions

View File

@ -515,6 +515,19 @@ void buildEquidistant(cell *c) {
// if(generatingEquidistant) printf("mcv=0\n");
c->landparam = 1;
}
else if(DIM == 3) {
forCellCM(c2, c) if(coastval(c2, b) == mcv)
forCellEx(c3, c2) if(coastval(c3, b) < mcv)
forCellCM(c4, c3) {
if(c4->land == laNone && c2->mpdist <= BARLEV) setdist(c4, BARLEV, c2);
buildEquidistant(c4);
}
forCellCM(c2, c) {
int cv = coastval(c2, b);
if(cv < mcv) mcv = cv;
}
c->landparam = mcv + 1;
}
else {
// if it appears twice, increase it
int qcv = 0;