From 8e726d1231d43de565b08352c8993284c8f365c7 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 17 Dec 2022 20:18:49 +0100 Subject: [PATCH] fixed the roof (hiding incorrectly) in gproduct --- graph.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/graph.cpp b/graph.cpp index 2802afa2..c16d0085 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5072,10 +5072,15 @@ EX void make_actual_view() { ld d = wall_radar(centerover, Start, NLP, max); actual_view_transform = get_shift_view_of(ztangent(d), actual_view_transform * View) * view_inverse(View); } - camera_level = asin_auto(tC0(view_inverse(actual_view_transform * View))[2]); - if(geom3::euc_in_nil()) camera_level = tC0(view_inverse(actual_view_transform * View))[1]; - if(geom3::hyp_in_solnih()) camera_level = tC0(view_inverse(actual_view_transform * View))[0]; + hyperpoint h = tC0(view_inverse(actual_view_transform * View)); + + if(geom3::euc_in_nil()) camera_level = h[1]; + else if(geom3::euc_in_solnih()) camera_level = h[2]; + else if(geom3::hyp_in_solnih()) camera_level = h[0]; + else if(gproduct) camera_level = log(h[2]); + else camera_level = asin_auto(h[2]); if(moved_center()) camera_level--; + camera_sign = cgi.FLOOR > cgi.WALL; } if(nonisotropic && !nonisotropic_weird_transforms) {