fix rightmost column in weapon rendering with interpolation enabled (#1125)

This commit is contained in:
Roman Fomin 2023-07-04 11:31:35 +07:00 committed by GitHub
parent b78d752803
commit 32f1dc5dd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -811,10 +811,11 @@ void R_DrawPSprite (pspdef_t *psp)
if (lump == oldlump && pspr_interp)
{
int deltax = vis->x2 - vis->x1;
int deltax = x2 - vis->x1;
vis->x1 = oldx1 + FixedMul(vis->x1 - oldx1, fractionaltic);
vis->x2 = vis->x1 + deltax;
vis->x2 = vis->x2 >= viewwidth ? viewwidth - 1 : vis->x2;
if (vis->x2 >= viewwidth)
vis->x2 = viewwidth - 1;
vis->texturemid = oldtexturemid + FixedMul(vis->texturemid - oldtexturemid, fractionaltic);
}
else