1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

UNRECTIFIED now works with non-orientable

This commit is contained in:
Zeno Rogue 2021-09-30 12:04:58 +02:00
parent 3967aee968
commit 70c0fb1c7a

View File

@ -1186,11 +1186,13 @@ EX namespace gp {
cell *create_move(cell *parent, int d) { cell *create_move(cell *parent, int d) {
if(UNRECTIFIED) { if(UNRECTIFIED) {
cellwalker cw(mapping[parent], d); cellwalker cw(mapping[parent], d);
bool b = cw.mirrored;
in_underlying([&] { in_underlying([&] {
cw += wstep; cw += wstep;
cw --; cw --;
cw += wstep; cw += wstep;
cw --; cw --;
if(cw.mirrored != b) cw++;
}); });
cw.at = get_mapped(cw.at, 0); cw.at = get_mapped(cw.at, 0);
parent->c.connect(d, cw.at, cw.spin, cw.mirrored); parent->c.connect(d, cw.at, cw.spin, cw.mirrored);