Don't use finesine table when offseting for plane rotation

- This table isn't precise enough, so the result is noticeably off if
  you're far enough from the origin.
This commit is contained in:
Randy Heit 2015-02-20 22:52:30 -06:00
parent a5f8c4ead2
commit 5f43e5b4ea
1 changed files with 4 additions and 4 deletions

View File

@ -1512,11 +1512,11 @@ void R_DrawNormalPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
yscale = pl->yscale << (16 - ds_ybits);
if (planeang != 0)
{
fixed_t cosine = finecosine[planeang >> ANGLETOFINESHIFT];
fixed_t sine = finesine[planeang >> ANGLETOFINESHIFT];
double rad = bam2rad(planeang);
double cosine = cos(rad), sine = sin(rad);
pviewx = pl->xoffs + FixedMul (viewx, cosine) - FixedMul (viewy, sine);
pviewy = pl->yoffs - FixedMul (viewx, sine) - FixedMul (viewy, cosine);
pviewx = xs_RoundToInt(pl->xoffs + viewx * cosine - viewy * sine);
pviewy = xs_RoundToInt(pl->yoffs - viewx * sine - viewy * cosine);
}
else
{