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
1 changed files with 5 additions and 1 deletions

View File

@ -1364,6 +1364,10 @@ EX bool in(int dim, int s7) { return in(dim) && S7 == s7; }
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]));
}
}