From 8d423fdc6f237e5ad669f90cd16515be9a67ccdd Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 3 Aug 2022 19:59:46 +0200 Subject: [PATCH] - toned down the fov change a bit. With real projection math it was a bit extreme. --- source/games/duke/src/render.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/render.cpp b/source/games/duke/src/render.cpp index 51e0a31f0..aefa00db8 100644 --- a/source/games/duke/src/render.cpp +++ b/source/games/duke/src/render.cpp @@ -271,8 +271,11 @@ void displayrooms(int snum, double smoothratio, bool sceneonly) } else { - if (isRRRA() && p->DrugMode) - fov = atan(getdrugmode(p, 65536) * (1. / 65536.)) * (4 * r_fov / pi::pi()); + if (isRRRA() && p->DrugMode) + { + double fovdelta = atan(getdrugmode(p, 65536) * (1. / 65536.)) * (360. / pi::pi()) - 90.; + fov = (float)clamp(r_fov + fovdelta * 0.6, r_fov, 150.); + } // The camera texture must be rendered with the base palette, so this is the only place where the current global palette can be set.