From 83cc7a55cebb11597c5b3b2fa0636a7dd8718191 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 2 Nov 2026 14:38:38 +0100 Subject: [PATCH] fix fof noencore ceiling checks being flipped in opengl renderer matches software now even if most custom maps were made with opengl in mind, stuff did not work anyways for years so this shouldnt hopefully cause any issues --- src/hardware/hw_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 83319ab79..0de963a66 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -3259,7 +3259,7 @@ static void HWR_Subsector(size_t num) } else { - HWR_GetFlat(flatlump, R_NoEncore(rover->master->frontsector, !bottom)); + HWR_GetFlat(flatlump, R_NoEncore(rover->master->frontsector, bottom)); light = R_GetPlaneLight(gl_frontsector, centerHeight, underside); HWR_RenderPlane(sub, &extrasubsectors[num], !bottom, roverheight, HWR_RippleBlend(gl_frontsector, rover, false)|PF_Occlude, *gl_frontsector->lightlist[light].lightlevel, flatlump, @@ -4586,7 +4586,10 @@ static void HWR_RenderDrawNodes(void) gl_frontsector = NULL; if (!(plane->blend & PF_NoTexture)) - HWR_GetFlat(plane->lumpnum, R_NoEncore(plane->FOFSector, plane->isceiling)); + { + const boolean ceiling = plane->FOFSector ? !plane->isceiling : plane->isceiling; // match software! + HWR_GetFlat(plane->lumpnum, R_NoEncore(plane->FOFSector, ceiling)); + } HWR_RenderPlane(NULL, plane->xsub, plane->isceiling, plane->fixedheight, plane->blend, plane->lightlevel, plane->lumpnum, plane->FOFSector, plane->alpha, plane->planecolormap);