Fix vertical aim being off when using lack of perspective

This commit is contained in:
Hanicef authored and Alug committed 2025-10-14 22:25:45 +02:00
1 parent f34c86628e
commit 9e1707e7a4
1 file changed
+3 -1
+3 -1
View File
@@ -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;
}