From c09f5c042563364e7b71c8b494024cd857baab74 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 12 Aug 2022 22:13:45 +0100 Subject: [PATCH] Fix a regression in non-ramp sector (no step down) functionality. Seems to be a regression in internal too. Requires more analysis on behaviour in the 2.2 engine, but essential for maintaining compatibility in 2.1 (such as with Opulence wobbly carpet). --- src/p_map.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/p_map.c b/src/p_map.c index 6eba4d05..c7647da6 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -2766,7 +2766,11 @@ boolean P_TryMove(mobj_t *thing, fixed_t x, fixed_t y, boolean allowdropoff) return false; // mobj must lower itself to fit } } - else if (maxstep > 0) // Step down + else if (maxstep > 0 && !( + thing->player && ( + P_PlayerTouchingSectorSpecial(thing->player, 1, 14) + || GETSECSPECIAL(R_PointInSubsector(x, y)->sector->special, 1) == 14) + )) // Step down { // If the floor difference is MAXSTEPMOVE or less, and the sector isn't Section1:14, ALWAYS // step down! Formerly required a Section1:13 sector for the full MAXSTEPMOVE, but no more.