From 0520725069a121af42c3f3b4dbe9f20c169bc5c0 Mon Sep 17 00:00:00 2001 From: Nev3r Date: Fri, 31 Jul 2020 14:55:26 +0200 Subject: [PATCH] Fix the OpenGL FOF issue with a different approach. Not fond of it either but at least it works. --- src/hardware/hw_main.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 219bc905e..777fd6f1c 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1621,15 +1621,18 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { for (rover = gl_backsector->ffloors; rover; rover = rover->next) { + // Skip if it exists on both sectors. + ffloor_t * r2; + for (r2 = gl_frontsector->ffloors; r2; r2 = r2->next) + if (rover->master == r2->master) + continue; + if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) continue; if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES) continue; if (*rover->topheight < lowcut || *rover->bottomheight > highcut) continue; - if (Tag_Find(&gl_frontsector->tags, rover->master->args[0])) // Skip FOF if on both sectors by checking arg0. Hacky but it works. - continue; - texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture); @@ -1758,14 +1761,18 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { for (rover = gl_frontsector->ffloors; rover; rover = rover->next) { + // Skip if it exists on both sectors. + ffloor_t * r2; + for (r2 = gl_backsector->ffloors; r2; r2 = r2->next) + if (rover->master == r2->master) + continue; + if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) continue; if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) continue; if (*rover->topheight < lowcut || *rover->bottomheight > highcut) continue; - if (Tag_Find(&gl_backsector->tags, rover->master->args[0])) // Skip FOF if on both sectors by checking arg0. Hacky but it works. - continue; texnum = R_GetTextureNum(sides[rover->master->sidenum[0]].midtexture);