- fixed missing geometry with render precision set to quality

https://forum.zdoom.org/viewtopic.php?t=60423
This commit is contained in:
alexey.lysiuk 2018-05-02 13:14:04 +03:00 committed by Christoph Oelckers
parent 14410ae526
commit e87cdd3658

View file

@ -208,7 +208,9 @@ int GLWall::CountVertices()
} }
} }
auto sidedef = seg->sidedef; 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; int cnt2 = 0;
for (int i = sidedef->numsegs - 2; i >= 0; i--) for (int i = sidedef->numsegs - 2; i >= 0; i--)
@ -218,7 +220,8 @@ int GLWall::CountVertices()
if (sidefrac <= glseg.fracleft) break; if (sidefrac <= glseg.fracleft) break;
cnt2++; 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; cnt += cnt2;
} }
vi = vertexes[1]; vi = vertexes[1];