diff --git a/src/gl/scene/gl_flats.cpp b/src/gl/scene/gl_flats.cpp index 378cd81f0..d8329f214 100644 --- a/src/gl/scene/gl_flats.cpp +++ b/src/gl/scene/gl_flats.cpp @@ -64,6 +64,9 @@ #include "gl/utility/gl_convert.h" #include "gl/utility/gl_templates.h" +#ifdef _DEBUG +CVAR(Int, gl_breaksec, -1, 0) +#endif //========================================================================== // // Sets the texture matrix according to the plane's texture positioning @@ -328,7 +331,7 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG int rel = getExtraLight(); #ifdef _DEBUG - if (sector->sectornum == 130) + if (sector->sectornum == gl_breaksec) { int a = 0; } @@ -490,7 +493,7 @@ void GLFlat::ProcessSector(sector_t * frontsector) lightlist_t * light; #ifdef _DEBUG - if (frontsector->sectornum==0) + if (frontsector->sectornum==gl_breaksec) { int a = 0; } @@ -639,8 +642,7 @@ void GLFlat::ProcessSector(sector_t * frontsector) if ((rover->flags&(FF_EXISTS|FF_RENDERPLANES|FF_THISINSIDE))==(FF_EXISTS|FF_RENDERPLANES)) { if (rover->flags&FF_FOG && gl_fixedcolormap) continue; - if (rover->top.copied) continue; // this plane has been dynamically created and does not produce any rendered surface. - if (rover->flags&(FF_INVERTPLANES|FF_BOTHPLANES)) + if (!rover->top.copied && rover->flags&(FF_INVERTPLANES|FF_BOTHPLANES)) { fixed_t ff_top=rover->top.plane->ZatPoint(CenterSpot(sector)); if (ff_topflags&(FF_EXISTS|FF_RENDERPLANES|FF_THISINSIDE))==(FF_EXISTS|FF_RENDERPLANES)) { if (rover->flags&FF_FOG && gl_fixedcolormap) continue; - if (rover->bottom.copied) continue; // this plane has been dynamically created and does not produce any rendered surface. - if (rover->flags&(FF_INVERTPLANES|FF_BOTHPLANES)) + if (!rover->bottom.copied && rover->flags&(FF_INVERTPLANES|FF_BOTHPLANES)) { fixed_t ff_bottom=rover->bottom.plane->ZatPoint(CenterSpot(sector)); if (ff_bottom>lastfloorheight || (rover->flags&FF_FIX))