From e87cdd36583b200d102ff38ae0ea376b1ee29bb1 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 2 May 2018 13:14:04 +0300 Subject: [PATCH] - fixed missing geometry with render precision set to quality https://forum.zdoom.org/viewtopic.php?t=60423 --- src/hwrenderer/scene/hw_walls_vertex.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hwrenderer/scene/hw_walls_vertex.cpp b/src/hwrenderer/scene/hw_walls_vertex.cpp index 576a2fb03..6d74a2369 100644 --- a/src/hwrenderer/scene/hw_walls_vertex.cpp +++ b/src/hwrenderer/scene/hw_walls_vertex.cpp @@ -208,7 +208,9 @@ int GLWall::CountVertices() } } auto sidedef = seg->sidedef; - if (!(flags & (GLWF_NOSPLITLOWER | GLWF_NOSPLITUPPER)) && sidedef->numsegs > 1) + constexpr auto NOSPLIT_LOWER_UPPER = GLWF_NOSPLITLOWER | GLWF_NOSPLITUPPER; + const bool canSplit = (flags & NOSPLIT_LOWER_UPPER) != NOSPLIT_LOWER_UPPER; + if (canSplit && sidedef->numsegs > 1) { int cnt2 = 0; for (int i = sidedef->numsegs - 2; i >= 0; i--) @@ -218,7 +220,8 @@ int GLWall::CountVertices() if (sidefrac <= glseg.fracleft) break; cnt2++; } - if ((flags & (GLWF_NOSPLITLOWER | GLWF_NOSPLITUPPER)) == (GLWF_NOSPLITLOWER | GLWF_NOSPLITUPPER)) cnt2 <<= 1; + const bool splitBoth = !(flags & NOSPLIT_LOWER_UPPER); + if (splitBoth) cnt2 <<= 1; cnt += cnt2; } vi = vertexes[1];