From fc636b53caa8d487f03d62cc8a987611c4b07378 Mon Sep 17 00:00:00 2001 From: pogokeen Date: Mon, 6 May 2019 21:53:44 +0000 Subject: [PATCH] polymost.cpp: Fix issue where state would not be reset properly in polymost_drawmaskwall() when rendering translucent maskwalls with no texture git-svn-id: https://svn.eduke32.com/eduke32@7626 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/polymost.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/build/src/polymost.cpp b/source/build/src/polymost.cpp index 1f5860ca9..ee05718dc 100644 --- a/source/build/src/polymost.cpp +++ b/source/build/src/polymost.cpp @@ -5827,8 +5827,14 @@ void polymost_drawmaskwall(int32_t damaskwallcnt) if (!waloff[globalpicnum]) { // restore this to normal - glDisable(GL_BLEND); - glEnable(GL_ALPHA_TEST); + if (polymost_maskWallHasTranslucency(wal)) + { + glEnable(GL_ALPHA_TEST); + } else + { + glDisable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + } } }