1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-20 18:59:36 +00:00

fixed a bug in twisted non-cube

This commit is contained in:
Zeno Rogue 2019-04-16 04:15:00 +02:00
parent 21985e4317
commit 5b87088ade

View File

@ -611,7 +611,15 @@ namespace euclid3 {
heptagon *build(heptagon *parent, int d, coord at) { heptagon *build(heptagon *parent, int d, coord at) {
auto h = get_at(at); auto h = get_at(at);
h->c.connect((d+S7/2)%S7, parent, d, false); int d1 = (d+S7/2)%S7;
if(twisted) {
coord a = ispacemap[parent];
coord b = ispacemap[h];
for(int i=0; i<S7; i++)
if(canonicalize(b + shifttable[i]) == a)
d1 = i;
}
h->c.connect(d1, parent, d, false);
return h; return h;
} }