From 5047f4e7f08f10410f970ea50de745be7a73edb2 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Tue, 25 Jun 2019 14:58:34 -0300 Subject: [PATCH] Fix slope flat offsets --- src/r_plane.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/r_plane.c b/src/r_plane.c index f79a5f90a..e982f41d6 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -972,6 +972,7 @@ void R_DrawSinglePlane(visplane_t *pl) if (ds_powersoftwo) { // But xoffs and yoffs are zero..... ???!?!?!???!?!?! + // (Except when flat alignment is involved) xoffs &= ((1 << (32-nflatshiftup))-1); yoffs &= ((1 << (32-nflatshiftup))-1); @@ -986,9 +987,10 @@ void R_DrawSinglePlane(visplane_t *pl) } else { - // The origin vector is a vertex from whatever linedef defined this slope - xoffs = -pl->slope->o.x; - yoffs = pl->slope->o.y; + // Whoops, this is actually incorrect behaviour. + // Keep xoffs and yoffs as they are if this flat has offsets + //xoffs = -pl->slope->o.x; + //yoffs = pl->slope->o.y; } vx = FIXED_TO_FLOAT(pl->viewx+xoffs);