Use float for calculating aspect ratio

This commit is contained in:
Hanicef 2024-03-30 21:10:09 +01:00
parent 755adb0c46
commit de74137cae

View file

@ -5221,7 +5221,7 @@ 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) * (vid.width / vid.height) / (BASEVIDWIDTH / BASEVIDHEIGHT); trans->viewaiming = FIXED_TO_FLOAT(fixedaiming) * ((float)vid.width / vid.height) / ((float)BASEVIDWIDTH / BASEVIDHEIGHT);
trans->shearing = true; trans->shearing = true;
gl_aimingangle = 0; gl_aimingangle = 0;
} }