From d07c376f6d729eb8e4102ec6fd3784c9ed0e72b8 Mon Sep 17 00:00:00 2001
From: MascaraSnake <jonassauer27@gmail.com>
Date: Tue, 9 Jun 2020 09:44:49 +0200
Subject: [PATCH] Adapt POF_SPLAT to UDMF setup

---
 extras/conf/udb/Includes/SRB222_linedefs.cfg | 1 +
 src/p_polyobj.c                              | 2 +-
 src/p_polyobj.h                              | 3 ++-
 src/p_setup.c                                | 2 ++
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg
index 166836ca6..1f87c2c3a 100644
--- a/extras/conf/udb/Includes/SRB222_linedefs.cfg
+++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg
@@ -1550,6 +1550,7 @@ udmf
 					8 = "Don't render planes";
 					16 = "Trigger linedef executor on touch";
 					32 = "Crush player";
+					64 = "Cut cyan flat pixels";
 				}
 			}
 			arg4
diff --git a/src/p_polyobj.c b/src/p_polyobj.c
index 0968809c4..997d48282 100644
--- a/src/p_polyobj.c
+++ b/src/p_polyobj.c
@@ -231,7 +231,7 @@ static void Polyobj_GetInfo(polyobj_t *po, line_t *line)
 	/*if (line->args[3] & TMPF_DONTCLIPPLANES)
 		po->flags &= ~POF_CLIPPLANES;*/
 
-	if (lines[i].flags & ML_EFFECT6)
+	if (lines[i].flags & TMPF_SPLAT)
 		po->flags |= POF_SPLAT;
 
 	if (line->args[3] & TMPF_EXECUTOR) // Has a linedef executor
diff --git a/src/p_polyobj.h b/src/p_polyobj.h
index f9c6e005a..f24caca4e 100644
--- a/src/p_polyobj.h
+++ b/src/p_polyobj.h
@@ -58,7 +58,8 @@ typedef enum
 	TMPF_INVISIBLEPLANES = 1<<3,
 	TMPF_EXECUTOR        = 1<<4,
 	TMPF_CRUSH           = 1<<5,
-	//TMPF_DONTCLIPPLANES  = 1<<6,
+	TMPF_SPLAT           = 1<<6,
+	//TMPF_DONTCLIPPLANES  = 1<<7,
 } textmappolyobjectflags_t;
 
 //
diff --git a/src/p_setup.c b/src/p_setup.c
index 45899fb1d..41f57a2b3 100644
--- a/src/p_setup.c
+++ b/src/p_setup.c
@@ -2995,6 +2995,8 @@ static void P_ConvertBinaryMap(void)
 				lines[i].args[3] &= ~TMPF_INVISIBLEPLANES;
 			/*if (lines[paramline].flags & ML_EFFECT5)
 				lines[i].args[3] |= TMPF_DONTCLIPPLANES;*/
+			if (lines[paramline].flags & ML_EFFECT6)
+				lines[i].args[3] |= TMPF_SPLAT;
 			if (lines[paramline].flags & ML_NOCLIMB)
 				lines[i].args[3] |= TMPF_EXECUTOR;
 
-- 
GitLab