From 988adb825998b2e729571949340bc708153463cc Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 19 Aug 2019 11:51:04 +0200 Subject: [PATCH] product:: horocycles now have base altitude --- bigstuff.cpp | 1 + cell.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bigstuff.cpp b/bigstuff.cpp index 4d0acc31..1acdf47e 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -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; diff --git a/cell.cpp b/cell.cpp index ebf23bc8..75e5e1d3 100644 --- a/cell.cpp +++ b/cell.cpp @@ -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) {