Merge branch 'fix-shearing-vertical-aim' into 'next'

Fix vertical aim being off when using lack of perspective

See merge request STJr/SRB2!2408
This commit is contained in:
sphere 2024-06-03 13:17:37 +00:00
commit f54c34e2ee

View file

@ -5221,7 +5221,9 @@ static void HWR_SetTransformAiming(FTransform *trans, player_t *player, boolean
if (cv_glshearing.value == 1 || (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox))) if (cv_glshearing.value == 1 || (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox)))
{ {
fixed_t fixedaiming = AIMINGTODY(aimingangle); fixed_t fixedaiming = AIMINGTODY(aimingangle);
trans->viewaiming = FIXED_TO_FLOAT(fixedaiming); trans->viewaiming = FIXED_TO_FLOAT(fixedaiming) * ((float)vid.width / vid.height) / ((float)BASEVIDWIDTH / BASEVIDHEIGHT);
if (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; trans->shearing = true;
gl_aimingangle = 0; gl_aimingangle = 0;
} }