mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
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:
parent
a5f8c4ead2
commit
5f43e5b4ea
1 changed files with 4 additions and 4 deletions
|
@ -1512,11 +1512,11 @@ void R_DrawNormalPlane (visplane_t *pl, fixed_t alpha, bool additive, bool maske
|
||||||
yscale = pl->yscale << (16 - ds_ybits);
|
yscale = pl->yscale << (16 - ds_ybits);
|
||||||
if (planeang != 0)
|
if (planeang != 0)
|
||||||
{
|
{
|
||||||
fixed_t cosine = finecosine[planeang >> ANGLETOFINESHIFT];
|
double rad = bam2rad(planeang);
|
||||||
fixed_t sine = finesine[planeang >> ANGLETOFINESHIFT];
|
double cosine = cos(rad), sine = sin(rad);
|
||||||
|
|
||||||
pviewx = pl->xoffs + FixedMul (viewx, cosine) - FixedMul (viewy, sine);
|
pviewx = xs_RoundToInt(pl->xoffs + viewx * cosine - viewy * sine);
|
||||||
pviewy = pl->yoffs - FixedMul (viewx, sine) - FixedMul (viewy, cosine);
|
pviewy = xs_RoundToInt(pl->yoffs - viewx * sine - viewy * cosine);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue