product:: horocycles now have base altitude

This commit is contained in:
Zeno Rogue 2019-08-19 11:51:04 +02:00
parent 3528d8efa3
commit 988adb8259
2 changed files with 4 additions and 2 deletions

View File

@ -246,6 +246,7 @@ EX heptagon *createAlternateMap(cell *c, int rad, hstate firststate, int special
alt->emeraldval = 0;
alt->zebraval = 0;
alt->distance = 0;
alt->fieldval = product::current_view_level;
alt->c7 = NULL;
alt->alt = alt;
h->alt = alt;

View File

@ -489,8 +489,9 @@ static const int ALTDIST_ERROR = 90000;
EX int celldistAlt(cell *c) {
if(experimental) return 0;
if(prod) { auto w = product::get_where(c);
int d = 0;
product::in_underlying_map([&] { d = celldistAlt(w.first) + abs(w.second); });
int d = c->master->alt && c->master->alt->alt ? c->master->alt->alt->fieldval : 0;
d = abs(w.second - d);
product::in_underlying_map([&] { d += celldistAlt(w.first); });
return d;
}
if(masterless) {