improved updir and updir_alt

This commit is contained in:
Zeno Rogue 2021-07-29 14:38:55 +02:00
parent c53270ca16
commit c579db717f
1 changed files with 2 additions and 5 deletions

View File

@ -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; i<S7; i++)
if(h->move(i) && h->move(i)->alt == h->alt->move(0))
return i;
return -1;
return gmod(updir(h->alt) + altmap::relspin(h->alt), h->type);
}