1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

GP/Zebra no longer generates graphics incorrectly

This commit is contained in:
Zeno Rogue 2018-05-15 23:24:44 +02:00
parent eda65399d6
commit 586101e0d6

View File

@ -3370,6 +3370,21 @@ transmatrix calc_relative_matrix(cell *c2, cell *c1) {
//bool hsol = false; //bool hsol = false;
//transmatrix sol; //transmatrix sol;
while(h1 != h2) { while(h1 != h2) {
int confusion = 0;
if(quotient == 1 && gp::on) {
for(int d=0; d<S7; d++) if(h2->move[d] == h1) confusion++;
if(confusion > 1) {
transmatrix T;
confusion = 0;
for(int d=0; d<S7; d++) if(h2->move[d] == h1) {
int sp = h2->spin(d);
transmatrix T1 = gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;
if(confusion == 0 || T1[2][2] < T[2][2]) T = T1;
confusion++;
}
return T;
}
}
for(int d=0; d<S7; d++) if(h2->move[d] == h1) { for(int d=0; d<S7; d++) if(h2->move[d] == h1) {
int sp = h2->spin(d); int sp = h2->spin(d);
return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where; return gm * heptmove[sp] * spin(2*M_PI*d/S7) * where;