Fix vertical aim being off when using lack of perspective

This commit is contained in:
Alug committed 2024-03-31 23:27:30 +02:00
1 parent d3f6b983f4
commit ffb72f5fe3
1 file changed
+1 -1
+1 -1
View File
@@ -2726,7 +2726,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
// https://zdoom.org/wiki/Y-shearing
if (shearing)
{
float dy = FIXED_TO_FLOAT(AIMINGTODY(stransform->viewaiming)) * 2; //screen_width/BASEVIDWIDTH;
float dy = FIXED_TO_FLOAT(AIMINGTODY((stransform->viewaiming)) * 2)* ((float)vid.width / vid.height) / ((float)BASEVIDWIDTH / BASEVIDHEIGHT); //screen_width/BASEVIDWIDTH;
if (stransform->flip)
dy *= -1.0f;
pglTranslatef(0.0f, -dy/BASEVIDHEIGHT, 0.0f);