mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Fix rotated flats on slopes
This commit is contained in:
parent
e39c8aa62e
commit
bd0b7829bb
1 changed files with 5 additions and 4 deletions
|
@ -861,6 +861,9 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
}
|
}
|
||||||
else light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
else light = (pl->lightlevel >> LIGHTSEGSHIFT);
|
||||||
|
|
||||||
|
#ifdef ESLOPE
|
||||||
|
if (!pl->slope) // Don't mess with angle on slopes! We'll handle this ourselves later
|
||||||
|
#endif
|
||||||
if (viewangle != pl->viewangle)
|
if (viewangle != pl->viewangle)
|
||||||
{
|
{
|
||||||
memset(cachedheight, 0, sizeof (cachedheight));
|
memset(cachedheight, 0, sizeof (cachedheight));
|
||||||
|
@ -962,10 +965,8 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
m.z = FIXED_TO_FLOAT(FINESINE(ang));
|
m.z = FIXED_TO_FLOAT(FINESINE(ang));
|
||||||
|
|
||||||
// n is the u direction vector in view space
|
// n is the u direction vector in view space
|
||||||
ang += ANGLE_90>>ANGLETOFINESHIFT;
|
n.x = FIXED_TO_FLOAT(FINESINE(ang));
|
||||||
ang &= FINEMASK;
|
n.z = -FIXED_TO_FLOAT(FINECOSINE(ang));
|
||||||
n.x = -FIXED_TO_FLOAT(FINECOSINE(ang));
|
|
||||||
n.z = -FIXED_TO_FLOAT(FINESINE(ang));
|
|
||||||
|
|
||||||
ang = pl->plangle>>ANGLETOFINESHIFT;
|
ang = pl->plangle>>ANGLETOFINESHIFT;
|
||||||
m.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FINESINE(ang), viewy + FINECOSINE(ang))) - zeroheight;
|
m.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FINESINE(ang), viewy + FINECOSINE(ang))) - zeroheight;
|
||||||
|
|
Loading…
Reference in a new issue