From 35ebe947c49d7b968960f1a05adcebd892d785fc Mon Sep 17 00:00:00 2001 From: Nev3r Date: Sat, 20 Apr 2019 19:03:50 +0200 Subject: [PATCH] Things spawning over copied slopes now properly align on the new plane While I believe the opposite behavior was intentional at first, it has proven to be problematic and makes alignment a tedious task for copied planes. Signed-off-by: Nev3r --- src/p_slopes.c | 19 ++++++++++++++----- src/p_spec.c | 8 -------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/p_slopes.c b/src/p_slopes.c index 76af7bfde..30605b8da 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -625,8 +625,7 @@ void P_ResetDynamicSlopes(void) { slopelist = NULL; slopecount = 0; - // We'll handle copy slopes later, after all the tag lists have been made. - // Yes, this means copied slopes won't affect things' spawning heights. Too bad for you. + /// Generates line special-defined slopes. for (i = 0; i < numlines; i++) { switch (lines[i].special) @@ -725,11 +724,21 @@ void P_ResetDynamicSlopes(void) { break; } } + + /// Copies slopes from tagged sectors via line specials. + /// \note Doesn't actually copy, but instead they share the same pointers. + for (i = 0; i < numlines; i++) + switch (lines[i].special) + { + case 720: + case 721: + case 722: + P_CopySectorSlope(&lines[i]); + default: + break; + } } - - - // ============================================================================ // // Various utilities related to slopes diff --git a/src/p_spec.c b/src/p_spec.c index e0c1a7465..ec5de3224 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6693,14 +6693,6 @@ void P_SpawnSpecials(INT32 fromnetsave) sectors[s].midmap = lines[i].frontsector->midmap; break; -#ifdef ESLOPE // Slope copy specials. Handled here for sanity. - case 720: - case 721: - case 722: - P_CopySectorSlope(&lines[i]); - break; -#endif - default: break; }