From 775a0de6c14e4558d4f1c302a1867a3eed69df3e Mon Sep 17 00:00:00 2001
From: pogokeen <pogokeen@1a8010ca-5511-0410-912e-c29ae57300e0>
Date: Fri, 3 May 2019 15:02:44 +0000
Subject: [PATCH] polymost.cpp: fix issue where floors & ceilings with
 DAMETH_MASKPROPS were not being blended

git-svn-id: https://svn.eduke32.com/eduke32@7624 1a8010ca-5511-0410-912e-c29ae57300e0
---
 source/build/src/polymost.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp
index 9f8f36f67..2360766d0 100644
--- a/source/build/src/polymost.cpp
+++ b/source/build/src/polymost.cpp
@@ -4025,6 +4025,9 @@ static void polymost_internal_nonparallaxed(vec2f_t n0, vec2f_t n1, float ryp0,
         if (globalposz > getflorzofslope(sectnum, globalposx, globalposy))
             domostpolymethod = DAMETH_BACKFACECULL; //Back-face culling
 
+        if (domostpolymethod & DAMETH_MASKPROPS)
+            glEnable(GL_BLEND);
+
         polymost_domost(x0, y0, x1, y1); //flor
     }
     else
@@ -4032,9 +4035,15 @@ static void polymost_internal_nonparallaxed(vec2f_t n0, vec2f_t n1, float ryp0,
         if (globalposz < getceilzofslope(sectnum, globalposx, globalposy))
             domostpolymethod = DAMETH_BACKFACECULL; //Back-face culling
 
+        if (domostpolymethod & DAMETH_MASKPROPS)
+            glEnable(GL_BLEND);
+
         polymost_domost(x1, y1, x0, y0); //ceil
     }
 
+    if (domostpolymethod & DAMETH_MASKPROPS)
+        glDisable(GL_BLEND);
+
     domostpolymethod = DAMETH_NOMASK;
 }