- do not add two-sided walls outside of the visible range to the clipper

This caused a render glitch in Duke E4L2.
This commit is contained in:
Christoph Oelckers 2022-01-13 00:04:32 +01:00
parent 22afc25046
commit 1b162ececc

View file

@ -291,7 +291,7 @@ int BunchDrawer::ClipLine(int aline, bool portal)
if (portal) clipper->RemoveClipRange(startAngle, endAngle);
else
{
if (topclip < FLT_MAX || bottomclip > -FLT_MAX)
if ((topclip < FLT_MAX || bottomclip > -FLT_MAX) && !dontclip)
{
clipper->AddWindowRange(startAngle, endAngle, topclip, bottomclip, viewz);
//Printf("\nWall %d from %2.3f - %2.3f, (%2.3f, %2.3f) (passing)\n", line, bamang(startAngle).asdeg(), bamang(endAngle).asdeg(), topclip, bottomclip);