mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
crystal:: in relative_matrix, h2==h1 handled
This commit is contained in:
parent
090a0ebdef
commit
c5f1eb27c0
@ -691,9 +691,11 @@ struct hrmap_crystal : hrmap_standard {
|
||||
|
||||
virtual transmatrix relative_matrix(cell *h2, cell *h1, const hyperpoint& hint) override {
|
||||
if(!crystal3()) return hrmap_standard::relative_matrix(h2, h1, hint);
|
||||
if(h2 == h1) return Id;
|
||||
for(int i=0; i<S7; i++) if(h2 == h1->move(i)) return adj(h1->master, i);
|
||||
if(gmatrix0.count(h2) && gmatrix0.count(h1))
|
||||
return inverse(gmatrix0[h1]) * gmatrix0[h2];
|
||||
println(hlog, "unknown relmatrix, distance = ", celldistance(h1, h2));
|
||||
return xpush(999);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user