From 56ce6abbc211724f66d1bfaba336ab71f597b03a Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 5 Jun 2016 12:38:23 +0300 Subject: [PATCH] Fixed splitting of walls in compatibility renderer Any wall adjacent to 3D floor sector were not rendered at all --- src/gl/scene/gl_walls.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gl/scene/gl_walls.cpp b/src/gl/scene/gl_walls.cpp index edd85e1df..1abbb2e5f 100644 --- a/src/gl/scene/gl_walls.cpp +++ b/src/gl/scene/gl_walls.cpp @@ -395,25 +395,25 @@ void GLWall::SplitWall(sector_t * frontsector, bool translucent) continue; } - if (gl.glslversion >= 1.3f) + // check for an intersection with the upper and lower planes of the wall segment + if ((maplightbottomleftztop[1]) || + (maplightbottomleft > ztop[0] && maplightbottomright < ztop[1]) || + (maplightbottomleftzbottom[1]) || + (maplightbottomleft > zbottom[0] && maplightbottomright < zbottom[1])) { - // check for an intersection with the upper and lower planes of the wall segment - if ((maplightbottomleftztop[1]) || - (maplightbottomleft > ztop[0] && maplightbottomright < ztop[1]) || - (maplightbottomleftzbottom[1]) || - (maplightbottomleft > zbottom[0] && maplightbottomright < zbottom[1])) + if (gl.glslversion >= 1.3f) { // Use hardware clipping if this cannot be done cleanly. this->lightlist = &lightlist; PutWall(translucent); - goto out; } - } - else - { - // crappy fallback if no clip planes available - SplitWallComplex(frontsector, translucent, maplightbottomleft, maplightbottomright); - return; + else + { + // crappy fallback if no clip planes available + SplitWallComplex(frontsector, translucent, maplightbottomleft, maplightbottomright); + } + + goto out; } // 3D floor is completely within this light