From 5caea5a256db5e02cd1c5a588c061026e0187556 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Wed, 4 Jan 2017 04:49:10 +0100 Subject: [PATCH] Fix clipping regression caused by splitting clip handling from line rendering --- src/swrenderer/line/r_line.cpp | 4 ++-- src/swrenderer/segments/r_clipsegment.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/swrenderer/line/r_line.cpp b/src/swrenderer/line/r_line.cpp index 18db1752f..60269bf1b 100644 --- a/src/swrenderer/line/r_line.cpp +++ b/src/swrenderer/line/r_line.cpp @@ -550,7 +550,7 @@ namespace swrenderer RenderWallSegmentTextures(start, stop); if (fake3D & 7) { - return !(fake3D & FAKE3D_FAKEMASK); + return (fake3D & FAKE3D_FAKEMASK) == 0; } // save sprite clipping info @@ -607,7 +607,7 @@ namespace swrenderer WallPortals.Push(pds); } - return !(fake3D & FAKE3D_FAKEMASK); + return (fake3D & FAKE3D_FAKEMASK) == 0; } void SWRenderLine::SetWallVariables(bool needlights) diff --git a/src/swrenderer/segments/r_clipsegment.cpp b/src/swrenderer/segments/r_clipsegment.cpp index 7a2d8b1f4..04bef8907 100644 --- a/src/swrenderer/segments/r_clipsegment.cpp +++ b/src/swrenderer/segments/r_clipsegment.cpp @@ -144,9 +144,9 @@ namespace swrenderer } // There is a fragment above *start. - if (!callback(first, start->first) && solid) + if (callback(first, start->first) && solid) { - start->first = first; + start->first = first; // Adjust the clip size for solid walls } }