From 49c1645b5fef84c56cfe161a4a207292a9974642 Mon Sep 17 00:00:00 2001
From: MascaraSnake <jonassauer27@gmail.com>
Date: Wed, 29 Dec 2021 11:03:00 +0100
Subject: [PATCH] Adapt linedef type 63 to UDMF

---
 extras/conf/udb/Includes/SRB222_linedefs.cfg | 11 +++++++++++
 src/p_setup.c                                |  3 +++
 src/p_spec.c                                 |  2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg
index 5abb11ae93..c2bcfa3b34 100644
--- a/extras/conf/udb/Includes/SRB222_linedefs.cfg
+++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg
@@ -1640,6 +1640,17 @@ udmf
 			title = "Horizon Effect";
 			prefix = "(41)";
 		}
+
+		63
+		{
+			title = "Fake Floor/Ceiling Planes";
+			prefix = "(63)";
+			arg0
+			{
+				title = "Target sector tag";
+				type = 13;
+			}
+		}
 	}
 
 	parameters
diff --git a/src/p_setup.c b/src/p_setup.c
index 4564ec75e6..9fe4446a6c 100644
--- a/src/p_setup.c
+++ b/src/p_setup.c
@@ -3340,6 +3340,9 @@ static void P_ConvertBinaryMap(void)
 			}
 			lines[i].special = 61;
 			break;
+		case 63: //Fake floor/ceiling planes
+			lines[i].args[0] = tag;
+			break;
 		case 66: //Move floor by displacement
 		case 67: //Move ceiling by displacement
 		case 68: //Move floor and ceiling by displacement
diff --git a/src/p_spec.c b/src/p_spec.c
index 22ca43bbbc..82f18b402f 100644
--- a/src/p_spec.c
+++ b/src/p_spec.c
@@ -6206,7 +6206,7 @@ void P_SpawnSpecials(boolean fromnetsave)
 
 			case 63: // support for drawn heights coming from different sector
 				sec = sides[*lines[i].sidenum].sector-sectors;
-				TAG_ITER_SECTORS(tag, s)
+				TAG_ITER_SECTORS(lines[i].args[0], s)
 					sectors[s].heightsec = (INT32)sec;
 				break;
 
-- 
GitLab