From 8e7cce8b61aa8e3e2b3ec0db101646ef6a8fb9a6 Mon Sep 17 00:00:00 2001
From: spherallic <spherallic@gmail.com>
Date: Thu, 27 Jun 2024 17:16:03 +0200
Subject: [PATCH] Fix dynamic slope height changes not always being considered
 as "moved"

---
 src/p_slopes.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/p_slopes.c b/src/p_slopes.c
index c2bacad9ed..ce276a6729 100644
--- a/src/p_slopes.c
+++ b/src/p_slopes.c
@@ -181,8 +181,8 @@ void T_DynamicSlopeLine (dynlineplanethink_t* th)
 {
 	pslope_t* slope = th->slope;
 	line_t* srcline = th->sourceline;
-
-	fixed_t zdelta;
+	
+	fixed_t zdelta, oldoz = slope->o.z;
 
 	switch(th->type) {
 	case DP_FRONTFLOOR:
@@ -209,7 +209,7 @@ void T_DynamicSlopeLine (dynlineplanethink_t* th)
 		return;
 	}
 
-	if (slope->zdelta != FixedDiv(zdelta, th->extent)) {
+	if (slope->zdelta != FixedDiv(zdelta, th->extent) || oldoz != slope->o.z) {
 		slope->zdelta = FixedDiv(zdelta, th->extent);
 		slope->zangle = R_PointToAngle2(0, 0, th->extent, -zdelta);
 		slope->moved = true;
-- 
GitLab