From cfc62c5ee05cbaeb40c6a8f69335fd98e3a7dbca Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 4 Dec 2022 16:30:51 +0100 Subject: [PATCH] Fixed the radar transform computation in 2.5D. The bug also affected fog rendering --- graph.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph.cpp b/graph.cpp index 343aab1e..7f69bb5f 100644 --- a/graph.cpp +++ b/graph.cpp @@ -5056,9 +5056,9 @@ EX void make_actual_view() { transmatrix T = actual_view_transform * View; transmatrix U = view_inverse(T); - if(T[0][2]) + if(T[0][2]) T = spin(-atan2(T[0][2], T[1][2])) * T; - if(T[1][2] && T[2][2]) + if(T[1][2]) T = cspin(1, 2, -atan2(T[1][2], T[2][2])) * T; ld z = -asin_auto(tC0(view_inverse(T)) [2]);