From 344d86d61b6387a9f23e8bfae468972fa983c41b Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 28 Jan 2025 08:24:00 +0700 Subject: [PATCH] fix linearsky calculation for large sky texture width (#2160) --- src/r_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/r_main.c b/src/r_main.c index 21fbc483..e2cc68fd 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -367,10 +367,7 @@ static void R_InitTextureMapping(void) xtoviewangle[x] = (i<= 0) - linearskyangle[x] = angle; - else - linearskyangle[x] = ANG90 + angle; + linearskyangle[x] = (angle >= 0) ? angle : ANGLE_MAX + angle; } // Take out the fencepost cases from viewangletox.