From 0e030466e15152e61050350ad7a01187b1265bc4 Mon Sep 17 00:00:00 2001 From: sphere Date: Thu, 17 Jun 2021 13:23:27 +0200 Subject: [PATCH] Add flag to line slopes for copying their slopes to the other side. --- extras/conf/SRB2-22.cfg | 16 ++++++++++++++++ src/p_setup.c | 6 ++++++ src/p_slopes.c | 3 +++ 3 files changed, 25 insertions(+) diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index 5a464eb5d..a9027f14a 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -2950,8 +2950,10 @@ linedeftypes prefix = "(700)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 1; + copyslopeargs = 1; } 701 @@ -2960,8 +2962,10 @@ linedeftypes prefix = "(701)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 2; + copyslopeargs = 4; } 702 @@ -2970,8 +2974,10 @@ linedeftypes prefix = "(702)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 3; + copyslopeargs = 5; } 703 @@ -2980,8 +2986,10 @@ linedeftypes prefix = "(703)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 9; + copyslopeargs = 8; } 704 @@ -3012,8 +3020,10 @@ linedeftypes prefix = "(710)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 4; + copyslopeargs = 2; } 711 @@ -3022,8 +3032,10 @@ linedeftypes prefix = "(711)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 8; + copyslopeargs = 8; } 712 @@ -3032,8 +3044,10 @@ linedeftypes prefix = "(712)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 12; + copyslopeargs = 10; } 713 @@ -3042,8 +3056,10 @@ linedeftypes prefix = "(713)"; flags2048text = "[11] No physics"; flags4096text = "[12] Dynamic"; + flags32768text = "[15] Copy to other side"; slope = "regular"; slopeargs = 6; + copyslopeargs = 6; } 714 diff --git a/src/p_setup.c b/src/p_setup.c index 51d2f474d..8d2ba4b01 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -3154,6 +3154,12 @@ static void P_ConvertBinaryMap(void) if (lines[i].flags & ML_NONET) lines[i].args[2] |= TMSL_DYNAMIC; + if (lines[i].flags & ML_TFERLINE) + { + lines[i].args[4] |= backfloor ? TMSC_BACKTOFRONTFLOOR : (frontfloor ? TMSC_FRONTTOBACKFLOOR : 0); + lines[i].args[4] |= backceil ? TMSC_BACKTOFRONTCEILING : (frontceil ? TMSC_FRONTTOBACKCEILING : 0); + } + lines[i].special = 700; break; } diff --git a/src/p_slopes.c b/src/p_slopes.c index 4e93e4a45..e99ecc64c 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -664,6 +664,9 @@ void P_SpawnSlopes(const boolean fromsave) { for (i = 0; i < numlines; i++) switch (lines[i].special) { + case 700: + if (lines[i].flags & ML_TFERLINE) P_CopySectorSlope(&lines[i]); + break; case 720: P_CopySectorSlope(&lines[i]); default: