From e0d97e4b1a3bc3e5c17f4538237b47754f1c0478 Mon Sep 17 00:00:00 2001 From: RedEnchilada Date: Sat, 23 May 2015 16:27:15 -0500 Subject: [PATCH] Slope planes should now not turn into static in 99% of cases --- src/r_plane.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index 0cd15835..6aae1e25 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -952,6 +952,15 @@ void R_DrawSinglePlane(visplane_t *pl) xoffs &= ((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<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; - // 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<