From b84199faef5fd8dc6399c02eb17a61eb2f9f5590 Mon Sep 17 00:00:00 2001
From: sphere <spherallic@gmail.com>
Date: Sun, 6 Jun 2021 12:53:13 +0200
Subject: [PATCH] Simplify some code at toaster's suggestion.

---
 src/r_segs.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/r_segs.c b/src/r_segs.c
index 0b9c9a80e..1e07364e0 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -162,17 +162,8 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
 		return;
 
 	transtable = R_GetLinedefTransTable(ldef);
-	if (ldef->blendmode == AST_ADD || ldef->blendmode == AST_SUBTRACT || ldef->blendmode == AST_REVERSESUBTRACT)
-	{
-		if (transtable == NUMTRANSMAPS)
-			transtable = 0;
-		blendmode = ldef->blendmode;
-	}
-	else if (ldef->blendmode == AST_MODULATE)
-	{
+	if ((blendmode = ldef->blendmode) && (transtable == NUMTRANSMAPS || blendmode == AST_MODULATE))
 		transtable = 0;
-		blendmode = AST_MODULATE;
-	}
 	if (transtable != NUMTRANSMAPS && (dc_transmap = R_GetBlendTable(blendmode, transtable)))
 	{
 		colfunc = colfuncs[COLDRAWFUNC_FUZZY];
-- 
GitLab