diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index 777fd6f1c..a1d7797ea 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -1621,11 +1621,17 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { for (rover = gl_backsector->ffloors; rover; rover = rover->next) { + boolean bothsides = false; // 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; + { + bothsides = true; + break; + } + + if (bothsides) continue; if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) continue; @@ -1761,11 +1767,17 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { for (rover = gl_frontsector->ffloors; rover; rover = rover->next) { + boolean bothsides = false; // 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; + { + bothsides = true; + break; + } + + if (bothsides) continue; if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) continue; diff --git a/src/r_segs.c b/src/r_segs.c index 52c19d96e..92b605180 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -2142,7 +2142,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) for (r2 = frontsector->ffloors; r2; r2 = r2->next) { if (r2->master == rover->master) // Skip if same control line. - continue; + break; if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)) continue; @@ -2199,6 +2199,9 @@ void R_StoreWallRange(INT32 start, INT32 stop) for (r2 = backsector->ffloors; r2; r2 = r2->next) { + if (r2->master == rover->master) // Skip if same control line. + break; + if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)) continue;