mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 23:31:50 +00:00
Slope planes should now not turn into static in 99% of cases
This commit is contained in:
parent
109d379980
commit
e0d97e4b1a
1 changed files with 9 additions and 3 deletions
|
@ -952,6 +952,15 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
xoffs &= ((1 << (32-nflatshiftup))-1);
|
xoffs &= ((1 << (32-nflatshiftup))-1);
|
||||||
yoffs &= ((1 << (32-nflatshiftup))-1);
|
yoffs &= ((1 << (32-nflatshiftup))-1);
|
||||||
|
|
||||||
|
xoffs -= (pl->slope->o.x + (1 << (31-nflatshiftup))) & ~((1 << (32-nflatshiftup))-1);
|
||||||
|
yoffs += (pl->slope->o.y + (1 << (31-nflatshiftup))) & ~((1 << (32-nflatshiftup))-1);
|
||||||
|
|
||||||
|
// Okay, look, don't ask me why this works, but without this setup there's a disgusting-looking misalignment with the textures. -Red
|
||||||
|
fudge = ((1<<nflatshiftup)+1.0f)/(1<<nflatshiftup);
|
||||||
|
|
||||||
|
xoffs *= fudge;
|
||||||
|
yoffs /= fudge;
|
||||||
|
|
||||||
vx = FIXED_TO_FLOAT(viewx+xoffs);
|
vx = FIXED_TO_FLOAT(viewx+xoffs);
|
||||||
vy = FIXED_TO_FLOAT(viewy-yoffs);
|
vy = FIXED_TO_FLOAT(viewy-yoffs);
|
||||||
vz = FIXED_TO_FLOAT(viewz);
|
vz = FIXED_TO_FLOAT(viewz);
|
||||||
|
@ -981,9 +990,6 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
m.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FLOAT_TO_FIXED(sin(ang)), viewy + FLOAT_TO_FIXED(cos(ang)))) - zeroheight;
|
m.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FLOAT_TO_FIXED(sin(ang)), viewy + FLOAT_TO_FIXED(cos(ang)))) - zeroheight;
|
||||||
n.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FLOAT_TO_FIXED(cos(ang)), viewy - FLOAT_TO_FIXED(sin(ang)))) - zeroheight;
|
n.y = FIXED_TO_FLOAT(P_GetZAt(pl->slope, viewx + FLOAT_TO_FIXED(cos(ang)), viewy - FLOAT_TO_FIXED(sin(ang)))) - zeroheight;
|
||||||
|
|
||||||
// Okay, look, don't ask me why this works, but without this setup there's a disgusting-looking misalignment with the textures. -Red
|
|
||||||
fudge = ((1<<nflatshiftup)+1.0f)/(1<<nflatshiftup);
|
|
||||||
|
|
||||||
m.x /= fudge;
|
m.x /= fudge;
|
||||||
m.y /= fudge;
|
m.y /= fudge;
|
||||||
m.z /= fudge;
|
m.z /= fudge;
|
||||||
|
|
Loading…
Reference in a new issue