From c579db717f58f6da3648fe451b6e22bd9dfac882 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 29 Jul 2021 14:38:55 +0200 Subject: [PATCH] improved updir and updir_alt --- cell.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/cell.cpp b/cell.cpp index 9346ce04..ba793425 100644 --- a/cell.cpp +++ b/cell.cpp @@ -609,7 +609,7 @@ EX int updir(heptagon *h) { return -1; } #endif - if(h->distance == 0) return -1; + if(h->s == hsOrigin) return -1; return 0; } @@ -623,10 +623,7 @@ EX int updir_alt(heptagon *h) { return -1; } #endif - for(int i=0; imove(i) && h->move(i)->alt == h->alt->move(0)) - return i; - return -1; + return gmod(updir(h->alt) + altmap::relspin(h->alt), h->type); }