1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

euclid:: trying to generate wall lines in non-standard Euclidean geometry no longer crashes the game

This commit is contained in:
Zeno Rogue 2021-02-04 15:37:54 +01:00
parent 5c77ffa36c
commit cfdf016c5d

View File

@ -1364,6 +1364,10 @@ EX bool in(int dim, int s7) { return in(dim) && S7 == s7; }
EX } EX }
EX gp::loc euc2_coordinates(cell *c) { return euc::full_coords2(c); } EX gp::loc euc2_coordinates(cell *c) {
if(euc::in()) return euc::full_coords2(c);
hyperpoint h = calc_relative_matrix(c, currentmap->gamestart(), C0) * C0;
return gp::loc(floor(h[0]), floor(h[1]));
}
} }