From 7033d83d267d231eb561aadc1945987d16104e31 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 2 Nov 2017 04:25:59 +0000 Subject: [PATCH] Fox's maskwall fix 2.0 git-svn-id: https://svn.eduke32.com/eduke32@6495 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 2e4ef6b25..acb923647 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -2375,8 +2375,8 @@ skip: ; int const ni = vsp[i].n; - if ((vsp[i].ctag == vsp[ni].ctag) && (vsp[i].ftag == vsp[ni].ftag) /*&& - ((vsp[ni].cy[1] <= vsp[i].cy[1]) || (vsp[ni].fy[1] >= vsp[i].fy[1]))*/) + if ((vsp[i].ctag == vsp[ni].ctag) && (vsp[i].ftag == vsp[ni].ftag) && + ((vsp[i].cy[1] <= vsp[ni].cy[1]) || (vsp[i].fy[1] <= vsp[ni].fy[1]))) { vsp[i].cy[1] = vsp[ni].cy[1]; vsp[i].fy[1] = vsp[ni].fy[1]; @@ -4188,7 +4188,7 @@ void polymost_drawmaskwall(int32_t damaskwallcnt) if (t0 >= 0) dp2[n2++] = dpxy[i]; - if ((t0 >= 0) != (t1 >= 0)) + if ((t0 >= 0) != (t1 >= 0) && (t0 <= 0) != (t1 <= 0)) { float const r = t0 / (t0 - t1); dp2[n2].x = (dpxy[j].x - dpxy[i].x) * r + dpxy[i].x; @@ -4215,7 +4215,7 @@ void polymost_drawmaskwall(int32_t damaskwallcnt) if (t0 >= 0) dpxy[n++] = dp2[i]; - if ((t0 >= 0) != (t1 >= 0)) + if ((t0 >= 0) != (t1 >= 0) && (t0 <= 0) != (t1 <= 0)) { float const r = t0 / (t0 - t1); dpxy[n].x = (dp2[j].x - dp2[i].x) * r + dp2[i].x;