From 48e3b5e37da8951185ddad99d065b2b1d2b1574f Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 5 Apr 2016 10:43:56 +0100 Subject: [PATCH] Corrected botch-up with plane viewangles, slope planes probably broke because of the last commit --- src/r_plane.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index ef8570590..ac7dcb90e 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -299,7 +299,7 @@ void R_MapPlane(INT32 y, INT32 x1, INT32 x2) } length = FixedMul (distance,distscale[x1]); - angle = (viewangle + xtoviewangle[x1])>>ANGLETOFINESHIFT; + angle = (currentplane->viewangle + currentplane->plangle + xtoviewangle[x1])>>ANGLETOFINESHIFT; /// \note Wouldn't it be faster just to add viewx and viewy // to the plane's x/yoffs anyway?? @@ -970,14 +970,14 @@ void R_DrawSinglePlane(visplane_t *pl) // p is the texture origin in view space // Don't add in the offsets at this stage, because doing so can result in // errors if the flat is rotated. - ang = ANG2RAD(ANGLE_270 - viewangle); + ang = ANG2RAD(ANGLE_270 - pl->viewangle); p.x = vx * cos(ang) - vy * sin(ang); p.z = vx * sin(ang) + vy * cos(ang); temp = P_GetZAt(pl->slope, -xoffs, yoffs); p.y = FIXED_TO_FLOAT(temp) - vz; // m is the v direction vector in view space - ang = ANG2RAD(ANGLE_180 - pl->viewangle); + ang = ANG2RAD(ANGLE_180 - (pl->viewangle + pl->plangle)); m.x = cos(ang); m.z = sin(ang);