1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 05:52:59 +00:00

fixed raycaster in sph_in_low; seems to still need fixing in non-regular

This commit is contained in:
Zeno Rogue
2022-12-15 21:17:08 +01:00
parent 9b91d46f47
commit 74b59d3331
2 changed files with 39 additions and 3 deletions

View File

@@ -455,6 +455,16 @@ EX ld hypot_d(int d, const hyperpoint& h) {
*/
EX transmatrix to_other_side(hyperpoint h1, hyperpoint h2) {
if(geom3::sph_in_low() && !geom3::flipped) {
geom3::light_flip(true);
h1 = normalize(h1);
h2 = normalize(h2);
transmatrix T = to_other_side(h1, h2);
for(int i=0; i<4; i++) T[i][3] = T[3][i] = i == 3;
geom3::light_flip(false);
return T;
}
ld d = hdist(h1, h2);
hyperpoint v;