From 923e9c4a3ba172a76020bb5479175b32fffc0c1c Mon Sep 17 00:00:00 2001
From: Lactozilla <jp6781615@gmail.com>
Date: Mon, 24 Jul 2023 16:54:34 -0300
Subject: [PATCH] Simpler skyscale calculation

---
 src/r_sky.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/r_sky.c b/src/r_sky.c
index c47029f0b..1b2c43d12 100644
--- a/src/r_sky.c
+++ b/src/r_sky.c
@@ -75,6 +75,5 @@ void R_SetupSkyDraw(void)
 */
 void R_SetSkyScale(void)
 {
-	fixed_t difference = vid.fdupx-(vid.dupx<<FRACBITS);
-	skyscale = FixedDiv(fovtan, vid.fdupx+difference);
+	skyscale = FixedDiv(fovtan, FixedDiv(vid.width*FRACUNIT, BASEVIDWIDTH*FRACUNIT));
 }
-- 
GitLab