From 9e1707e7a409b4ffce7a5274b92a7b615ac9d979 Mon Sep 17 00:00:00 2001 From: Hanicef Date: Sat, 30 Mar 2024 17:58:27 +0100 Subject: [PATCH] Fix vertical aim being off when using lack of perspective --- src/hardware/hw_main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 6ffed9fad..8f596c619 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -5325,7 +5325,9 @@ static void HWR_SetTransformAiming(FTransform *trans) if (cv_glshearing.value) { fixed_t fixedaiming = AIMINGTODY(aimingangle); - trans->viewaiming = FixedToFloat(fixedaiming); + trans->viewaiming = FixedToFloat(fixedaiming) * ((float)vid.width / vid.height) / ((float)BASEVIDWIDTH / BASEVIDHEIGHT); + if (splitscreen == 1) // only for 2 player splitscreen + trans->viewaiming *= 2.125; // splitscreen adjusts fov with 0.8, so compensate (but only halfway, since splitscreen means only half the screen is used) trans->shearing = true; gl_aimingangle = 0; }