1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-20 11:54:48 +00:00

improved updir and updir_alt

This commit is contained in:
Zeno Rogue 2021-07-29 14:38:55 +02:00
parent c53270ca16
commit c579db717f

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);
}